amap

package
v0.0.0-...-a6cba19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package amap provides the functions to expand a token using the AMAP algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(token string, scope TokenScope, referenceText []string) []string

Expand on AMAP receives a token and returns and array of possible expansions.

The AMAP expansion algorithm handles single-word and multi-word abbreviations. For each type of abbreviation AMAP creates and applies a pattern to look for possible expansions. AMAP is capable of select the more appropriate expansions based on available information on the given context.

Types

type TokenScope

type TokenScope struct {
	// contains filtered or unexported fields
}

TokenScope represents the elements on the scoped-approach for the AMAP expander.

func NewTokenScope

func NewTokenScope(variableDeclarations []string, methodName string, methodBodyText string,
	methodComments []string, packageComments []string) TokenScope

NewTokenScope creates a new token scope.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL