WordNetSource codeParentContentsIndex
NLP.WordNet.Types
Portability non-portable (H98 + implicit parameters)
Stability experimental
Maintainer
Contents
The wrapper type for wordnet functions.
The basic Word type (just a String).
The part of speech type.
The type, and functions dealing with overview searches.
The type, and functions dealing with the word net environment.
The type to control which sense a search is looking at.
The type, and functions dealing with search results.
A sum type of the different relations which can hold between words.
A simple key into the database.
Description

This module is maintained at: http://www.isi.edu/~hdaume/HWordNet/.

This module describes the types used in the purely functional interface.

More information about WordNet is available at: http://http://www.cogsci.princeton.edu/~wn/.

Synopsis
type WN a = a
type Word = String
data POS
= Noun
| Verb
| Adj
| Adv
data Overview
numNounSenses :: Overview -> Int
numVerbSenses :: Overview -> Int
numAdjSenses :: Overview -> Int
numAdvSenses :: Overview -> Int
taggedCountNounSenses :: Overview -> Int
taggedCountVerbSenses :: Overview -> Int
taggedCountAdjSenses :: Overview -> Int
taggedCountAdvSenses :: Overview -> Int
data WordNetEnv
getReleaseVersion :: WN (Maybe String)
getDataDirectory :: WN FilePath
data SenseType
= AllSenses
| SenseNumber Int
data SearchResult
srOverview :: SearchResult -> Maybe Overview
srSenseNum :: SearchResult -> Maybe SenseType
srPOS :: SearchResult -> POS
srDefinition :: SearchResult -> String
srSenses :: SearchResult -> [SenseType]
srWords :: SearchResult -> SenseType -> [Word]
srForms :: SearchResult -> [Form]
srFormKeys :: SearchResult -> Form -> [Key]
srToKey :: SearchResult -> Key
data Form
= Antonym
| Hypernym
| Hyponym
| Entailment
| Similar
| IsMember
| IsStuff
| IsPart
| HasMember
| HasStuff
| HasPart
| Meronym
| Holonym
| CauseTo
| PPL
| SeeAlso
| Attribute
| VerbGroup
| Derivation
| Classification
| Class
| Nominalization
| Syns
| Freq
| Frames
| Coords
| Relatives
| HMeronym
| HHolonym
| WNGrep
| OverviewForm
| Unknown
data Key
The wrapper type for wordnet functions.
type WN a = a

In actuality this type is:

 type WN a = (?wne :: WordNetEnv) => a

but Haddock cannot parse this at this time.

The basic Word type (just a String).
type Word = String
A Word is just a String.
The part of speech type.
data POS
The basic part of speech type, either a Noun, Verb, Adjective or Adverb.
Constructors
Noun
Verb
Adj
Adv
Instances
Enum POS
Eq POS
Ord POS
Show POS
Ix POS
Typeable POS
The type, and functions dealing with overview searches.
data Overview
The Overview type is the return type which gives you an overview of a word, for all sense and for all parts of speech.
Instances
Eq Overview
Ord Overview
Show Overview
Typeable Overview
numNounSenses :: Overview -> Int
Given an Overview, this will tell you how many noun senses the searched-for word has.
numVerbSenses :: Overview -> Int
Given an Overview, this will tell you how many verb senses the searched-for word has.
numAdjSenses :: Overview -> Int
Given an Overview, this will tell you how many adjective senses the searched-for word has.
numAdvSenses :: Overview -> Int
Given an Overview, this will tell you how many adverb senses the searched-for word has.
taggedCountNounSenses :: Overview -> Int
Given an Overview, this will tell you how many times this word was tagged as a noun.
taggedCountVerbSenses :: Overview -> Int
Given an Overview, this will tell you how many times this word was tagged as a verb.
taggedCountAdjSenses :: Overview -> Int
Given an Overview, this will tell you how many times this word was tagged as an adjective.
taggedCountAdvSenses :: Overview -> Int
Given an Overview, this will tell you how many times this word was tagged as an adverb.
The type, and functions dealing with the word net environment.
data WordNetEnv
getReleaseVersion :: WN (Maybe String)
This will give you the current release of the WordNet databases we are using (if we know).
getDataDirectory :: WN FilePath
This will give you the directory from which the databases are being read.
The type to control which sense a search is looking at.
data SenseType
A SenseType is a way of controlling search. Either you specify a certain sense (using SenseNumber n, or, since SenseType is an instance of Num, you can juse use n) or by searching using all senses, through AllSenses. The Num instance performs standard arithmetic on SenseNumbers, and fromInteger yields a SenseNumber (always), but any arithmetic involving AllSenses returns AllSenses.
Constructors
AllSenses
SenseNumber Int
Instances
Num SenseType
Eq SenseType
Ord SenseType
Show SenseType
Typeable SenseType
The type, and functions dealing with search results.
data SearchResult
The basic type which holds search results. Its Show instance simply shows the string corresponding to the associated WordNet synset.
Instances
Typeable SearchResult
Show SearchResult
srOverview :: SearchResult -> Maybe Overview
This provides (maybe) the associated overview for a SearchResult. The Overview is only available if this SearchResult was derived from a real search, rather than lookupKey.
srSenseNum :: SearchResult -> Maybe SenseType
This provides (maybe) the associated sense number for a SearchResult. The SenseType is only available if this SearchResult was derived from a real search, rather than lookupKey.
srPOS :: SearchResult -> POS
This gives the part of speech of a SearchResult
srDefinition :: SearchResult -> String
This gives the definition of the sense of a word in a SearchResult.
srSenses :: SearchResult -> [SenseType]
This gives a list of senses the word has.
srWords :: SearchResult -> SenseType -> [Word]
This gives the actual words used to describe the Synset of a search result.
srForms :: SearchResult -> [Form]
This gives all the Forms a word has (i.e., what sort of relations hold between it and other words.
srFormKeys :: SearchResult -> Form -> [Key]
This provides a Key (which can be searched for using lookupKey) for a SearchResult under a given form. For instance, it can be used to get all Hypernyms of a given word.
srToKey :: SearchResult -> Key
This converts a SearchResult into a Key.
A sum type of the different relations which can hold between words.
data Form
The different types of relations which can hold between WordNet Synsets.
Constructors
Antonym
Hypernym
Hyponym
Entailment
Similar
IsMember
IsStuff
IsPart
HasMember
HasStuff
HasPart
Meronym
Holonym
CauseTo
PPL
SeeAlso
Attribute
VerbGroup
Derivation
Classification
Class
Nominalization
Syns
Freq
Frames
Coords
Relatives
HMeronym
HHolonym
WNGrep
OverviewForm
Unknown
Instances
Eq Form
Ord Form
Show Form
Enum Form
Typeable Form
A simple key into the database.
data Key
A Key is a simple pointer into the database, which can be followed using lookupKey.
Instances
Eq Key
Typeable Key
Produced by Haddock version 0.5