|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.parsing.Document
public class Document
This class is part of LEILA (http://mpii.de/yago-naga/leila). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the author Fabian M. Suchanek (http://suchanek.name).
Document.java maintains the contextual information of a sentence, like pronoun references and full names of people.
Nested Class Summary | |
---|---|
protected class |
Document.AgedLinkageWord
Represents a reference target, memorizes the time it has been created |
Field Summary | |
---|---|
protected static |
companies
Contains words that refer to companies |
protected int |
current
Counts the sentences |
protected java.util.Map<java.lang.String,LinkageWord> |
names
Contains the mapping familiyname/companyname->fullname |
protected java.util.Map<java.lang.String,Document.AgedLinkageWord> |
references
Maps references to their targets |
protected static int |
SPAN
Number of sentences during which a pronoun reference remains valid. |
Constructor Summary | |
---|---|
Document()
|
Method Summary | |
---|---|
void |
addName(LinkageWord l)
Adds a completion mapping familyName/companyName -> fullName |
void |
addTarget(LinkageWord l)
Adds a LinkageWord to the corresponding pronoun(s) |
void |
completeName(LinkageWord w)
Completes a family name/company name by the full name if the name is known. |
static boolean |
isResolvableReference(LinkageWord w)
Tells whether the LinkageWord is a resolvable reference |
void |
newSentence()
Notification for beginning of a new sentence |
void |
refreshTargetFor(java.lang.String s)
Refreshes a target |
void |
resolveReference(LinkageWord w)
Resolves a reference to its target |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int SPAN
protected static finalcompanies
protected int current
protected java.util.Map<java.lang.String,LinkageWord> names
protected java.util.Map<java.lang.String,Document.AgedLinkageWord> references
Constructor Detail |
---|
public Document()
Method Detail |
---|
public void newSentence()
public static boolean isResolvableReference(LinkageWord w)
public void resolveReference(LinkageWord w)
public void addTarget(LinkageWord l)
public void refreshTargetFor(java.lang.String s)
public void addName(LinkageWord l)
public void completeName(LinkageWord w)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |