jcolibri.extensions.textual.IE.opennlp
Class IETextOpenNLP

java.lang.Object
  extended by jcolibri.datatypes.Text
      extended by jcolibri.extensions.textual.IE.representation.IEText
          extended by jcolibri.extensions.textual.IE.opennlp.IETextOpenNLP
All Implemented Interfaces:
TypeAdaptor

public class IETextOpenNLP
extends IEText

Represents an IEText implemented using the OpenNLP package.
This object uses internally an NLPDocument object (from the OpenNLP package) that is an XML DOM document organized in paragraphs, sentences and tokens. The specific OpenNLP methods will decorate this DOM tree with information, so this class is a wrapper that implements the IEText superclass.

Version:
1.0
Author:
Juan A. Recio-Garcia
See Also:
IEText

Field Summary
protected  opennlp.common.xml.NLPDocument doc
           
 
Fields inherited from class jcolibri.extensions.textual.IE.representation.IEText
features, paragraphs, phrases, topics
 
Fields inherited from class jcolibri.datatypes.Text
rawContent
 
Constructor Summary
IETextOpenNLP()
          Creates an empty IETextOpenNLP object
IETextOpenNLP(java.lang.String content)
          Creates an IETextOpenNLP object with the given text
 
Method Summary
 void fromString(java.lang.String content)
          Stores the given text in the object
 opennlp.common.xml.NLPDocument getDocument()
          Returns the internal OpenNLP object that stores the text.
protected  org.jdom.Element getParagraphMapping(Paragraph par)
          Returns a mapping between a paragraph and the paragraph node in the DOM tree
protected  org.jdom.Element getSentenceMapping(Sentence sent)
          Returns a mapping between a sentence and the sentence node in the DOM tree
protected  org.jdom.Element getTokenMapping(Token tok)
          Returns a mapping between a token and the token node in the DOM tree
protected  void setParagraphMapping(Paragraph par, org.jdom.Element annot)
          Sets a mapping between a paragraph and the paragraph node in the DOM tree
protected  void setSentenceMapping(Sentence sent, org.jdom.Element annot)
          Sets a mapping between a sentence and the sentence node in the DOM tree
protected  void setTokenMapping(Token tok, org.jdom.Element annot)
          Sets a mapping between a token and the token node in the DOM tree
 
Methods inherited from class jcolibri.extensions.textual.IE.representation.IEText
addFeature, addFeatures, addParagraph, addParagraphs, addPhrase, addPhrases, addTopic, addTopics, getAllSentences, getAllTokens, getFeatures, getParagraphs, getPhrases, getRAWContent, getTopics, printAnnotations
 
Methods inherited from class jcolibri.datatypes.Text
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jcolibri.connector.TypeAdaptor
equals
 

Field Detail

doc

protected opennlp.common.xml.NLPDocument doc
Constructor Detail

IETextOpenNLP

public IETextOpenNLP()
Creates an empty IETextOpenNLP object


IETextOpenNLP

public IETextOpenNLP(java.lang.String content)
Creates an IETextOpenNLP object with the given text

Method Detail

fromString

public void fromString(java.lang.String content)
                throws java.lang.Exception
Stores the given text in the object

Specified by:
fromString in interface TypeAdaptor
Overrides:
fromString in class Text
Throws:
java.lang.Exception

getDocument

public opennlp.common.xml.NLPDocument getDocument()
Returns the internal OpenNLP object that stores the text.


getParagraphMapping

protected org.jdom.Element getParagraphMapping(Paragraph par)
Returns a mapping between a paragraph and the paragraph node in the DOM tree


setParagraphMapping

protected void setParagraphMapping(Paragraph par,
                                   org.jdom.Element annot)
Sets a mapping between a paragraph and the paragraph node in the DOM tree


getSentenceMapping

protected org.jdom.Element getSentenceMapping(Sentence sent)
Returns a mapping between a sentence and the sentence node in the DOM tree


setSentenceMapping

protected void setSentenceMapping(Sentence sent,
                                  org.jdom.Element annot)
Sets a mapping between a sentence and the sentence node in the DOM tree


getTokenMapping

protected org.jdom.Element getTokenMapping(Token tok)
Returns a mapping between a token and the token node in the DOM tree


setTokenMapping

protected void setTokenMapping(Token tok,
                               org.jdom.Element annot)
Sets a mapping between a token and the token node in the DOM tree


GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es