|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.xerox.jxip.XipResultManager
public class XipResultManager
The purpose of this class is to build XipResult. The result of a parse can be returned as a XipResult object. This object contains a vector of XipUnit objects. Each XipUnit object corresponds to the analysis of a given sentence. A XipUnit, in turn, is composed of the root of the chunking tree (a XipNode object) and a vector of dependencies (a XipDependency object). Each XipNode object contains a set of features, stored as a vector of XipFeature objects. Each XipDependency is composed of a dependency name, a vector of XipNode objects, and a set of XipFeature objects. If the node is a non-lexical node (such as an NP or a VP), then the surface field stores the label of that node, while the lemma vector remains empty. If a node is a lexical node, then the surface field stores the surface form of that lexeme, while the lemma vector stores all other possible reading for that lexeme. For non-lexical nodes, the list of all the daughters of a node is accessible through the daughters vector. Thus, you can explore the complete chunk tree using the root field of a XipUnit object as a starting point and scanning the daughter nodes. A dependency is a relation that links together nodes in the chunk tree. A dependency has a name, such as subject or object, and is associated with a set of features that are stored in a vector of XipFeature objects. The nodes that are linked together by a dependency are gathered in a vector of XipNode objects, each corresponding to a specific node in the chunk tree. Each node is associated with features. A feature expresses a property of the node, such as part of speech, singular and plural, and so on. A feature consists of a name and a value pair. For example, gender is a feature with the possible values of fem, masc, and neutral.
| Constructor Summary | |
|---|---|
XipResultManager()
Constructor for the XipResultManager object |
|
| Method Summary | |
|---|---|
int |
buildXipResult(int gHandler,
java.lang.String inputStr)
build the java XipResult (string parsing) |
int |
buildXipResultFromFile(int gHandler,
java.lang.String fileName)
build the java XipResult (file parsing) |
int |
buildXipResultFromXmlFile(int gHandler,
java.lang.String fileName)
call buildXipResultFromXmlFile (...., depth =2) |
int |
buildXipResultFromXmlFile(int gHandler,
java.lang.String fileName,
int depth)
build the java XipResult from (XML file parsing) |
void |
destroyNativeXipResult(int gHandler)
destroy the current c++ XipResult |
java.lang.String |
getXipOutput()
Gets the string generated by "print" in the xipRules |
XipResult |
getXipResult()
Gets the XipResult |
java.util.Hashtable<java.lang.String,java.lang.String> |
getXmlTagInfo()
|
void |
keepNativeXipResult()
do not destroy the current c++ XipResult |
static void |
main(java.lang.String[] args)
|
void |
myCBXml()
|
int |
xipResultBuilderFromString(int gHandler,
java.lang.String inputStr,
java.lang.Object objInst,
java.lang.String cb)
|
int |
xipResultBuilderFromTextFile(int gHandler,
java.lang.String textFileName,
java.lang.Object objInst,
java.lang.String cb)
|
int |
xipResultBuilderFromXmlFile(int gHandler,
java.lang.String xmlFileName,
java.lang.Object objInst,
java.lang.String cb,
java.lang.String xmlCb)
call xipResultBuilderFromXmlFile( .... |
int |
xipResultBuilderFromXmlFile(int gHandler,
java.lang.String xmlFileName,
java.lang.Object objInst,
java.lang.String cb,
java.lang.String xmlCb,
int depth)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XipResultManager()
| Method Detail |
|---|
public int buildXipResult(int gHandler,
java.lang.String inputStr)
throws java.lang.Exception
gHandler - a grammar handlerinputStr - the string to parse
java.lang.Exception
public int buildXipResultFromFile(int gHandler,
java.lang.String fileName)
throws java.lang.Exception
gHandler - a grammar handlerfileName - the full file name to parse
java.lang.Exception
public int buildXipResultFromXmlFile(int gHandler,
java.lang.String fileName)
throws java.lang.Exception
gHandler - a grammar handlerfileName - the full file name to parse
java.lang.Exception
public int buildXipResultFromXmlFile(int gHandler,
java.lang.String fileName,
int depth)
throws java.lang.Exception
gHandler - a grammar handlerfileName - the full file name to parsedepth - must be 0 or 2 (full or partial xml parsing)
java.lang.Exception
public int xipResultBuilderFromString(int gHandler,
java.lang.String inputStr,
java.lang.Object objInst,
java.lang.String cb)
throws java.lang.Exception
gHandler - a grammar handlerinputStr - the string to parseobjInst - the object instance of the callBack. If null, no callback
will be invokedcb - the callback method invoked after the analyze of one sentence
java.lang.Exception
public int xipResultBuilderFromTextFile(int gHandler,
java.lang.String textFileName,
java.lang.Object objInst,
java.lang.String cb)
throws java.lang.Exception
gHandler - a grammar handlertextFileName - the full file name to parse (text file)objInst - the object instance of the callBack. If null, no callback
will be invokedcb - the callback method invoked after the analyze of one sentence
java.lang.Exception
public int xipResultBuilderFromXmlFile(int gHandler,
java.lang.String xmlFileName,
java.lang.Object objInst,
java.lang.String cb,
java.lang.String xmlCb)
throws java.lang.Exception
gHandler - a grammar handlerxmlFileName - the full file name to parse (XML file)objInst - the object instance of the callBack. If null, no callback
will be invokedcb - the callback method invoked after the analyze of one sentencexmlCb - the callback method invoked after the each xml tag take in
account by the xip parser
java.lang.Exception
public int xipResultBuilderFromXmlFile(int gHandler,
java.lang.String xmlFileName,
java.lang.Object objInst,
java.lang.String cb,
java.lang.String xmlCb,
int depth)
throws java.lang.Exception
gHandler - a grammar handlerxmlFileName - the full file name to parse (XML file)objInst - the object instance of the callBack. If null, no callback
will be invokedcb - the callback method invoked after the analyze of one sentencexmlCb - the callback method invoked after the each xml tag take in
account by the xip parserdepth - must 0 or 2. (full or partial xml parsing)
java.lang.Exceptionpublic XipResult getXipResult()
public java.lang.String getXipOutput()
public void keepNativeXipResult()
throws java.lang.Exception
java.lang.Exception
public void destroyNativeXipResult(int gHandler)
throws java.lang.Exception
gHandler -
java.lang.Exceptionpublic java.util.Hashtable<java.lang.String,java.lang.String> getXmlTagInfo()
public void myCBXml()
public static void main(java.lang.String[] args)
args -
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||