ULAPI
8.0
Main Page
Classes
source
workers
ulpartofspeechtagger.h
1
7
#ifndef ULPARTOFSPEECHTAGGER_H
8
#define ULPARTOFSPEECHTAGGER_H
9
10
#include "ulworker.h"
11
#include "uldissector.h"
12
27
class
ULTaggedWord
28
{
29
public
:
30
friend
class
ULPartOfSpeechTagger
;
31
32
ULTaggedWord
();
33
ULTaggedWord
(
const
ULTaggedWord
& other);
34
virtual
~ULTaggedWord
();
35
36
void
operator=
(
const
ULTaggedWord
& other);
37
bool
operator==
(
const
ULTaggedWord
& other)
const
;
38
bool
operator<
(
const
ULTaggedWord
& other)
const
;
39
40
const
ULString
&
getSurfaceForm
()
const
;
41
const
ULList<ULDerivation>
&
getTagList
()
const
;
42
43
private
:
44
ULString
surfaceForm;
45
ULList<ULDerivation>
tags;
46
bool
ordered;
47
};
48
56
class
ULPartOfSpeechTagger
:
public
ULWorker
57
{
58
public
:
59
ULPartOfSpeechTagger
();
60
ULPartOfSpeechTagger
(
const
ULPartOfSpeechTagger
& other);
61
virtual
~ULPartOfSpeechTagger
();
62
63
ULPartOfSpeechTagger
&
operator=
(
const
ULPartOfSpeechTagger
& other);
64
void
clear
();
65
66
// Accessors.
67
const
ULLanguage
&
getLanguage
()
const
;
68
void
setDissector
(
ULDissector
*newDissector);
69
ULDissector
*
getDissector
();
70
71
// ULWorker interfaces.
72
virtual
bool
isServiceAvailable
(
const
ULServiceDescriptor
& service);
73
virtual
void
getAvailableServices
(
ULList<ULServiceDescriptor>
& services);
74
75
// The tagger's core services.
76
ULError
getTags
(
const
ULString
& sentence,
ULList<ULTaggedWord>
& taggedWords);
77
ULError
getTags
(
const
ULString
& sentence,
ULList<ULDerivation>
& words);
78
79
private
:
80
ULDissector
*dissector;
81
82
void
tokenize(
const
ULString
& s,
ULList<ULString>
& tokenList);
83
bool
resolveAmbiguityWithRule(
const
ULTaggingRule& rule,
84
ULList<ULTaggedWord>
& taggedWords,
85
uluint32& nAmbiguities);
86
bool
dissectionListHasMatchingCategory(
const
ULList<ULDerivation>
& wordList,
87
const
ULPartOfSpeechCategory
& category);
88
};
89
90
#endif
91
Generated on Sat Apr 13 2013 12:59:07 for ULAPI by
1.8.2