Documentation ¶
Index ¶
- Variables
- func AbsInt(x int) int
- func AddToFeatureStr(featureStr, newFeature string) string
- func DelFromFeatureMapAndStr(features map[string]string, featureStr, delFeature string) (map[string]string, string)
- func Heb2UDFeature(feature string) string
- func Heb2UDFeaturesString(features string) string
- func LocateFile(name string, subDirs []string) (path string, found bool)
- func LogMemory()
- func MD5File(fileName string) (string, error)
- func Max(a, b int) int
- func MaxInt(v []int) (retval int)
- func MergeFeatureStrs(feat1, feat2 string) (string, map[string]string)
- func Min(a, b int) int
- func NotDigitOrNeg(c rune) bool
- func Prefix(s string, n int) string
- func RangeInt(to int) []int
- func Sign(x int) int
- func Signature(s string) string
- func Strcmp(a, b string) int
- func Suffix(s string, n int) string
- func TestEach(t RuneTester, s string) byte
- func UniqueSortedStrings(sorted []string) []string
- type ByGeneric
- type EnumSet
- type Equaler
- type FeatureLookup
- type Format
- type Generic
- type Persist
- type RuneTester
- type TopNStrIntData
- type TopNStrIntDatum
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GenderMap = FeatureLookup{ UDName: "Gender", ValueMap: map[string]string{ "F": "Fem", "M": "Masc", }, } NumberMap = FeatureLookup{ UDName: "Number", ValueMap: map[string]string{ "S": "Sing", "P": "Plur", "D": "Dual", "Underspecified": "Underspecified", }, } PersonMap = FeatureLookup{ UDName: "Person", ValueMap: map[string]string{ "1": "1", "2": "2", "3": "3", "A": "1,2,3", }, } DefMap = FeatureLookup{ UDName: "Definite", ValueMap: map[string]string{ "D": "Def", "-": "Ind", }, } PolarMap = FeatureLookup{ UDName: "Polarity", ValueMap: map[string]string{ "pos": "Pos", "neg": "Neg", }, } TenseMap = FeatureLookup{ UDName: "Tense", ValueMap: map[string]string{ "PAST": "Past", "PRESENT": "Pres", "FUTURE": "Fut", "IMPERATIVE": "Imp", "BEINONI": "Pres", }, } TypeMap = FeatureLookup{ UDName: "PronType", ValueMap: map[string]string{ "DEM": "Dem", "IMP": "Ind", "PERS": "Prs", "REF": "Prs", }, } HEB2UDFeatureNameLookup = map[string]FeatureLookup{ "gen": GenderMap, "num": NumberMap, "per": PersonMap, "def": DefMap, "tense": TenseMap, "type": TypeMap, "polar": PolarMap, } HEB2UDPrefixPOS = map[string]string{ "ADVERB": "ADP", "CONJ": "CONJ", "DEF": "DET", "PREPOSITION": "ADP", "REL": "SCONJ", "TEMP": "SCONJ", } HEB2UDPOS = map[string]string{ "AT": "PART-Case=Acc", "BN": "VERB-VerbForm=Part", "BNT": "VERB-Definite=Cons|VerbForm=Part", "CC": "CCONJ", "CC-SUB": "SCONJ", "CC-COORD": "SCONJ", "CC-REL": "SCONJ", "CD": "NUM", "CDT": "NUM-Definite=Cons", "COP": "AUX-VerbType=Cop", "DT": "DET-Definite=Cons", "DTT": "DET-Definite=Cons", "EX": "VERB-HebExistential=True", "IN": "ADP", "INTJ": "INTJ", "JJ": "ADJ", "JJT": "ADJ-Definite=Cons", "MD": "AUX-VerbType=Mod", "NEG": "ADV", "NN": "NOUN", "NNP": "PROPN", "NNT": "NOUN-Definite=Cons", "NNPT": "PROPN-Abbvr=Yes", "P": "ADV-Prefix=Yes", "POS": "PART-Case=Gen", "PRP": "PRON", "QW": "ADV-PronType=Int", "RB": "ADV-Polarity=Neg", "TTL": "NOUN-Title=Yes", "VB": "VERB", } )
View Source
var Testers = []RuneTester{
IsDigit,
IsGraphic,
IsLetter,
IsLower,
IsMark,
IsNumber,
IsPunct,
IsSymbol,
IsTitle,
IsUpper,
}
Functions ¶
func AddToFeatureStr ¶ added in v1.2.0
func DelFromFeatureMapAndStr ¶ added in v1.2.0
func Heb2UDFeature ¶ added in v1.2.0
func Heb2UDFeaturesString ¶ added in v1.2.0
func LocateFile ¶ added in v1.2.1
func MergeFeatureStrs ¶ added in v1.2.0
func NotDigitOrNeg ¶
func TestEach ¶
func TestEach(t RuneTester, s string) byte
func UniqueSortedStrings ¶ added in v1.2.0
Types ¶
type EnumSet ¶
type EnumSet struct { Enum map[interface{}]int Index []interface{} Frozen bool // contains filtered or unexported fields }
func NewEnumSet ¶
func (*EnumSet) RebuildIndex ¶
func (e *EnumSet) RebuildIndex()
type FeatureLookup ¶ added in v1.2.0
type RuneTester ¶
type TopNStrIntData ¶
type TopNStrIntData []TopNStrIntDatum
func (TopNStrIntData) Len ¶
func (arr TopNStrIntData) Len() int
func (TopNStrIntData) Less ¶
func (arr TopNStrIntData) Less(a, b int) bool
func (TopNStrIntData) Swap ¶
func (arr TopNStrIntData) Swap(a, b int)
type TopNStrIntDatum ¶
func GetTopNStrInt ¶
func GetTopNStrInt(m map[string]int, n int) []TopNStrIntDatum
Click to show internal directories.
Click to hide internal directories.