|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gmail.thejcwk.semantics.PhraseExtractor
public class PhraseExtractor
Extracts phrases from an XML file with a specified structure. All phrases are extracted at once and are stored in an ArrayList.
| Nested Class Summary | |
|---|---|
class |
PhraseExtractor.PropertyLevel
Describes at what level in the XML file we find various properties of the Phrase class. |
| Field Summary | |
|---|---|
java.lang.String |
EMPTY_PHRASE_MARKER
The symbol that denotes an empty phrase. |
int |
MAX_PHRASES_PER_CLAUSE
The maximum phrases that are found organised under a clause. |
java.lang.String |
PHRASE_TAG_PREFIX
The string that precedes a number from 1..MAX_PHRASES_PER_CLAUSE to identify a phrase. |
| Constructor Summary | |
|---|---|
PhraseExtractor(java.io.File file)
Construct a new PhraseExtractor. |
|
| Method Summary | |
|---|---|
java.util.ArrayList<Phrase> |
getPhrases()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String EMPTY_PHRASE_MARKER
public final int MAX_PHRASES_PER_CLAUSE
public final java.lang.String PHRASE_TAG_PREFIX
| Constructor Detail |
|---|
public PhraseExtractor(java.io.File file)
throws java.lang.IllegalArgumentException
aFileName - The name of an XML file that contains the phrases to be extracted.
(Precondition: fileName must be a file name denoting a valid XML file.)
java.lang.IllegalArgumentException - If an invalid file name is given.| Method Detail |
|---|
public java.util.ArrayList<Phrase> getPhrases()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||