Documentation ¶
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Criteria
- type Handle
- type Lookup
- func (w *Lookup) Dump()
- func (w *Lookup) DumpStr() string
- func (w *Lookup) Gloss() string
- func (w *Lookup) Lemma() string
- func (w *Lookup) POS() PartOfSpeech
- func (w *Lookup) Related(r Relation) (relationships []Lookup)
- func (w *Lookup) String() string
- func (w *Lookup) Synonyms() (synonyms []string)
- func (w *Lookup) Word() string
- type PartOfSpeech
- type PartOfSpeechList
- type Relation
Constants ¶
const Pertainym = DerivedFromAdjective
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Criteria ¶
type Criteria struct { Matching string POS PartOfSpeechList }
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
An initialized read-only, in-ram instance of the wordnet database. May safely be shared by multiple threads of execution
type Lookup ¶
type Lookup struct {
// contains filtered or unexported fields
}
The results of a search against the wordnet database
func (*Lookup) POS ¶
func (w *Lookup) POS() PartOfSpeech
type PartOfSpeech ¶
type PartOfSpeech uint8
Parts of speech
const ( Noun PartOfSpeech = iota Verb Adjective // AdjectiveSatellite Adverb )
func (PartOfSpeech) String ¶
func (pos PartOfSpeech) String() string
type PartOfSpeechList ¶
type PartOfSpeechList []PartOfSpeech
A set of multiple parts of speech
func (PartOfSpeechList) Contains ¶
func (l PartOfSpeechList) Contains(want PartOfSpeech) bool
func (PartOfSpeechList) Empty ¶
func (l PartOfSpeechList) Empty() bool
type Relation ¶
type Relation uint32
The ways in which synonym clusters may be related to others.
const ( AlsoSee Relation = 1 << iota // A word with an opposite meaning Antonym // A noun for which adjectives express values. // The noun weight is an attribute, for which the adjectives light and heavy express values. Attribute Cause // Terms in different syntactic categories that have the same root form and are semantically related. DerivationallyRelatedForm // Adverbs are often derived from adjectives, and sometimes have antonyms; therefore the synset for an adverb usually contains a lexical pointer to the adjective from which it is derived. DerivedFromAdjective // A topical classification to which a synset has been linked with a REGION InDomainRegion InDomainTopic InDomainUsage ContainsDomainRegion ContainsDomainTopic ContainsDomainUsage Entailment // The generic term used to designate a whole class of specific instances. // Y is a hypernym of X if X is a (kind of) Y . Hypernym InstanceHypernym InstanceHyponym // The specific term used to designate a member of a class. X is a hyponym of Y if X is a (kind of) Y . Hyponym MemberMeronym PartMeronym SubstanceMeronym MemberHolonym PartHolonym SubstanceHolonym ParticipleOfVerb RelatedForm SimilarTo VerbGroup )