|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DecoderServerRemote
Specifies all methods necessary for a decoder client to get its settings and top-level probabilities from a server object.
Field Summary |
---|
Fields inherited from interface danbikel.switchboard.Server |
---|
acceptUnlimitedClients |
Method Summary | |
---|---|
Sexp |
convertUnknownWord(Symbol originalWord,
int index)
Returns either the specified word untouched, or a 3-element list as would be created by convertUnknownWords(SexpList) . |
SexpList |
convertUnknownWords(SexpList sentence)
Replaces all unknown words in the specified sentence with three-element lists. |
Map |
headToParentMap()
A mapping from head labels to possible parent labels. |
Map |
leftSubcatMap()
A mapping from left subcat-prediction conditioning contexts (typically parent and head nonterminal labels) to all possible left subcat frames. |
ProbabilityStructure |
leftSubcatProbStructure()
The probability structure for the submodel that generates subcats on the left-hand side of head constituents. |
double |
logPrior(int id,
TrainerEvent event)
Returns the prior probability of generating the nonterminal contained in the specified HeadEvent . |
double |
logProbGap(int id,
TrainerEvent event)
Returns the log of the probability of generating a gap. |
double |
logProbHead(int id,
TrainerEvent event)
Returns the log of the probability of generating a head child in the context of a particular parent (both the head to be generated and the parent are contained in the specified TrainerEvent object). |
double |
logProbHeadWithSubcats(int id,
TrainerEvent event)
Returns the log of the probability of generating a new head and its left and right subcat frames. |
double |
logProbLeftSubcat(int id,
TrainerEvent event)
Returns the log of the probability of generating a left subcat in the context of a particular parent and head (the subcat to be generated, the head and parent are all contained in the specified TrainerEvent
object). |
double |
logProbMod(int id,
TrainerEvent event)
Returns the log of the probability of generating a fully-lexicalized modifying nonterminal given a particular parent, head and other components of the syntactic context. |
double |
logProbModNT(int id,
TrainerEvent event)
Returns the log of the probability of generating a partially-lexicalized modifying nonterminal given a particular parent, head and other components of the syntactic context. |
double |
logProbRightSubcat(int id,
TrainerEvent event)
Returns the log of the probability of generating a right subcat in the context of a particular parent and head (the subcat to be generated, the head and parent are all contained in the specified TrainerEvent
object). |
double |
logProbSubcat(int id,
TrainerEvent event,
boolean side)
Invokes logProbLeftSubcat(int, TrainerEvent) or
logProbRightSubcat(int, TrainerEvent) depending on the value
of side . |
double |
logProbTop(int id,
TrainerEvent event)
Returns the log of the probability of generating the head nonterminal of an entire sentence. |
Map |
modNonterminalMap()
A map of events from the last back-off level of the modifier nonterminal–generation submodel to the set of possible futures (typically, a future is a modifier label and its head word's part-of-speech tag). |
ProbabilityStructure |
modNonterminalProbStructure()
The probability structure for the submodel that generates modifiers of head constituents. |
CountsTable |
nonterminals()
A counts table of unlexicalized nonterminals, i.e., a map of unlexicalized nonterminals to their respective frequencies in the training data. |
Map |
posMap()
Returns the map of vocabulary items to possible parts of speech, contained in the internal ModelCollection object. |
double |
probHead(int id,
TrainerEvent event)
Returns the probability of generating a head child in the context of a particular parent (both the head to be generated and the parent are contained in the specified TrainerEvent object). |
double |
probLeftSubcat(int id,
TrainerEvent event)
Returns the probability of generating a left subcat in the context of a particular parent and head (the subcat to be generated, the head and parent are all contained in the specified TrainerEvent
object). |
double |
probMod(int id,
TrainerEvent event)
Returns the probability of generating a fully-lexicalized modifying nonterminal given a particular parent, head and other components of the syntactic context. |
double |
probRightSubcat(int id,
TrainerEvent event)
Returns the probability of generating a right subcat in the context of a particular parent and head (the subcat to be generated, the head and parent are all contained in the specified TrainerEvent
object). |
double |
probTop(int id,
TrainerEvent event)
Returns the probability of generating the head nonterminal of an entire sentence. |
Set |
prunedPreterms()
A set of Sexp objects representing preterminals that were
pruned during training. |
Set |
prunedPunctuation()
Returns the set of preterminals ( Sexp objects) that were
punctuation elements that were “raised away” because they were
either at the beginning or end of a sentence. |
Map |
rightSubcatMap()
A mapping from right subcat-prediction conditioning contexts (typically parent and head nonterminal labels) to all possible right subcat frames. |
ProbabilityStructure |
rightSubcatProbStructure()
The probability structure for the submodel that generates subcats on the right-hand side of head constituents. |
Map |
simpleModNonterminalMap()
A map from unlexicalized parent-head-side triples to all possible partially-lexicalized modifying nonterminals. |
double |
testProb()
Returns a test probability (for debugging purposes). |
Methods inherited from interface danbikel.switchboard.Server |
---|
acceptClientsOnlyByRequest, id, maxClients |
Methods inherited from interface danbikel.switchboard.SwitchboardUser |
---|
alive, die, host |
Method Detail |
---|
Map posMap() throws RemoteException
ModelCollection
object. This map
is needed when decoding.
RemoteException
Map headToParentMap() throws RemoteException
Symbol
obects, and the values are
Set
objects containing Symbol
objects.
RemoteException
Map leftSubcatMap() throws RemoteException
Event
objects, and the values are
Set
objects containing Subcat
objects.
RemoteException
Map rightSubcatMap() throws RemoteException
Event
objects, and the values are
Set
objects containing Subcat
objects.
RemoteException
Map modNonterminalMap() throws RemoteException
Event
, and the values are Set
instances containing Event
objects.
RemoteException
Map simpleModNonterminalMap() throws RemoteException
modNonterminalMap()
.
The keys are SexpList
objects containing exactly three
Symbol
elements representing the following in a production:
Constants.LEFT
or
Constants.RIGHT
.
Set
objects containing SexpList
objects that contain exactly two Symbol
elements representing a
partially-lexicalized modifying nonterminal:
NP(NNP)
, which is a noun phrase headed by a singular
proper noun.
RemoteException
Settings.useSimpleModNonterminalMap
CountsTable nonterminals() throws RemoteException
RemoteException
Set prunedPreterms() throws RemoteException
Sexp
objects representing preterminals that were
pruned during training.
Sexp
objects representing preterminals that were
pruned during training.
RemoteException
Training.prune(Sexp)
,
Treebank.isPreterminal(Sexp)
Set prunedPunctuation() throws RemoteException
Sexp
objects) that were
punctuation elements that were “raised away” because they were
either at the beginning or end of a sentence.
RemoteException
Training.raisePunctuation(Sexp)
,
Treebank.isPuncToRaise(Sexp)
Sexp convertUnknownWord(Symbol originalWord, int index) throws RemoteException
convertUnknownWords(SexpList)
.
originalWord
- the original word to be (potentially) convertedindex
- the index of the specified word
convertUnknownWords(SexpList)
, or, if the
specified word is not unknown, then it is returned untouched
RemoteException
SexpList convertUnknownWords(SexpList sentence) throws RemoteException
WordFeatures.features(Symbol,boolean)
and
Constants.trueSym
if this word was never
observed during training or Constants.falseSym
if it was
observed at least once during training.
sentence
- a list of symbols representing a sentence to be parsed
RemoteException
ProbabilityStructure leftSubcatProbStructure() throws RemoteException
leftSubcatMap()
.
RemoteException
ProbabilityStructure rightSubcatProbStructure() throws RemoteException
rightSubcatMap()
.
RemoteException
ProbabilityStructure modNonterminalProbStructure() throws RemoteException
modNonterminalMap()
.
RemoteException
double testProb() throws RemoteException
RemoteException
double logPrior(int id, TrainerEvent event) throws RemoteException
HeadEvent
.
RemoteException
double logProbHeadWithSubcats(int id, TrainerEvent event) throws RemoteException
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbHead(int id, TrainerEvent event) throws RemoteException
TrainerEvent
object).
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbLeftSubcat(int id, TrainerEvent event) throws RemoteException
TrainerEvent
object).
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbRightSubcat(int id, TrainerEvent event) throws RemoteException
TrainerEvent
object).
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbSubcat(int id, TrainerEvent event, boolean side) throws RemoteException
logProbLeftSubcat(int, TrainerEvent)
or
logProbRightSubcat(int, TrainerEvent)
depending on the value
of side
.
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probabilityside
- either Constants.LEFT
or Constants.RIGHT
logProbLeftSubcat(int, TrainerEvent)
or
logProbRightSubcat(int, TrainerEvent)
RemoteException
double logProbTop(int id, TrainerEvent event) throws RemoteException
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbMod(int id, TrainerEvent event) throws RemoteException
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbModNT(int id, TrainerEvent event) throws RemoteException
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double logProbGap(int id, TrainerEvent event) throws RemoteException
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double probHead(int id, TrainerEvent event) throws RemoteException
TrainerEvent
object).
N.B.: This method is unsupported when Settings.precomputeProbs
is true
.
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double probMod(int id, TrainerEvent event) throws RemoteException
Settings.precomputeProbs
is true
.
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double probLeftSubcat(int id, TrainerEvent event) throws RemoteException
TrainerEvent
object).
N.B.: This method is unsupported when Settings.precomputeProbs
is true
.
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double probRightSubcat(int id, TrainerEvent event) throws RemoteException
TrainerEvent
object).
N.B.: This method is unsupported when Settings.precomputeProbs
is true
.
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
double probTop(int id, TrainerEvent event) throws RemoteException
Settings.precomputeProbs
is true
.
id
- the unique id of the client invoking the methodevent
- the top-level TrainerEvent
, containing the
complete context needed to compute the requested probability
RemoteException
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |