WordNetSource codeParentContentsIndex
NLP.WordNet.PrimTypes
Synopsis
type Offset = Integer
data POS
= Noun
| Verb
| Adj
| Adv
data EPOS
= POS POS
| Satellite
| AdjSatellite
| IndirectAnt
| DirectAnt
| UnknownEPos
| Pertainym
readEPOS :: String -> EPOS
data WordNetEnv = WordNetEnv {
dataHandles :: (Array POS (Handle, Handle))
excHandles :: (Array POS Handle)
senseHandle, countListHandle, keyIndexHandle, revKeyIndexHandle :: (Maybe Handle)
vSentHandle :: (Maybe (Handle, Handle))
wnReleaseVersion :: (Maybe String)
dataDirectory :: FilePath
warnAbout :: (String -> Exception -> IO ())
}
data SenseKey = SenseKey {
senseKeyPOS :: POS
senseKeyString :: String
senseKeyWord :: String
}
newtype Key = Key (Offset, POS)
data Synset = Synset {
hereIAm :: Offset
ssType :: EPOS
fnum :: Int
pos :: EPOS
ssWords :: [(String, Int, SenseType)]
whichWord :: (Maybe Int)
forms :: [(Form, Offset, EPOS, Int, Int)]
frames :: [(Int, Int)]
defn :: String
key :: (Maybe Offset)
searchType :: Int
headWord :: String
headSense :: SenseType
}
data SearchResult = SearchResult {
srSenseKey :: (Maybe SenseKey)
srOverview :: (Maybe Overview)
srIndex :: (Maybe Index)
srSenseNum :: (Maybe SenseType)
srSynset :: Synset
}
data Index = Index {
indexWord :: String
indexPOS :: EPOS
indexSenseCount :: Int
indexForms :: [Form]
indexTaggedCount :: Int
indexOffsets :: [Offset]
}
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 SenseType
= AllSenses
| SenseNumber Int
data Overview = Overview {
nounIndex, verbIndex, adjIndex, advIndex :: (Maybe Index)
}
Documentation
type Offset = Integer
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
data EPOS
Constructors
POS POS
Satellite
AdjSatellite
IndirectAnt
DirectAnt
UnknownEPos
Pertainym
Instances
Enum EPOS
Show EPOS
Ix EPOS
Eq EPOS
Ord EPOS
Typeable EPOS
readEPOS :: String -> EPOS
data WordNetEnv
Constructors
WordNetEnv
dataHandles :: (Array POS (Handle, Handle))
excHandles :: (Array POS Handle)
senseHandle, countListHandle, keyIndexHandle, revKeyIndexHandle :: (Maybe Handle)
vSentHandle :: (Maybe (Handle, Handle))
wnReleaseVersion :: (Maybe String)
dataDirectory :: FilePath
warnAbout :: (String -> Exception -> IO ())
data SenseKey
Constructors
SenseKey
senseKeyPOS :: POS
senseKeyString :: String
senseKeyWord :: String
Instances
Show SenseKey
Typeable SenseKey
newtype Key
A Key is a simple pointer into the database, which can be followed using lookupKey.
Constructors
Key (Offset, POS)
Instances
Eq Key
Typeable Key
data Synset
Constructors
Synset
hereIAm :: Offset
ssType :: EPOS
fnum :: Int
pos :: EPOS
ssWords :: [(String, Int, SenseType)]
whichWord :: (Maybe Int)
forms :: [(Form, Offset, EPOS, Int, Int)]
frames :: [(Int, Int)]
defn :: String
key :: (Maybe Offset)
searchType :: Int
headWord :: String
headSense :: SenseType
data SearchResult
The basic type which holds search results. Its Show instance simply shows the string corresponding to the associated WordNet synset.
Constructors
SearchResult
srSenseKey :: (Maybe SenseKey)
srOverview :: (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.
srIndex :: (Maybe Index)
srSenseNum :: (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.
srSynset :: Synset
Instances
Typeable SearchResult
Show SearchResult
data Index
Constructors
Index
indexWord :: String
indexPOS :: EPOS
indexSenseCount :: Int
indexForms :: [Form]
indexTaggedCount :: Int
indexOffsets :: [Offset]
Instances
Eq Index
Ord Index
Show Index
Typeable Index
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
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
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.
Constructors
Overview
nounIndex, verbIndex, adjIndex, advIndex :: (Maybe Index)
Instances
Eq Overview
Ord Overview
Show Overview
Typeable Overview
Produced by Haddock version 0.5