|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTQL
public class TQL
This class contains most of the logic for recognising events. It takes care of reading all the lines in a block of statement, and process them according to rules. It constructs an ArrayList of Events, and saves the Events redundantly to the parent abstract.
TQLAbstract
,
OntologyParser
Field Summary | |
---|---|
int |
block
|
boolean |
debug_tql
|
int |
eventcounter
|
java.util.ArrayList<Event> |
events
|
int |
input
|
java.util.HashMap<java.lang.String,java.lang.String> |
nouns
|
OntologyParser |
op
|
TQLAbstract |
parent_abstract
|
java.util.ArrayList<java.lang.String> |
statements
|
Constructor Summary | |
---|---|
TQL(int input,
int block,
TQLAbstract par,
OntologyParser op)
A TQL represents a block of TQL-statements, and the associated events. |
Method Summary | |
---|---|
void |
addLine(java.lang.String line)
Add a TQL-statement to the list of lines. |
java.lang.String |
escapeRegEx(java.lang.String s)
for an abitary string, escape each character that could be misinterpreted in the context of regular expressions |
void |
extractEvents()
initiate extraction of events accorting to rules specified in this funciton |
void |
findEvent()
initiate extraction of events according to rule |
void |
findNoun()
initiate extraction of events according to rule |
void |
findNREL(Event e)
check if a sentence contains a noun relation, and possibly add into to already existing event (this method wraps for identifyNREL() |
void |
findVerb()
initiate extraction of events according to rule |
java.util.ArrayList |
getEvents()
Get an arraylist of the events in this TQL |
java.util.ArrayList |
getLines()
Get an arraylist of all statements |
int |
getNextEvID()
Get the next available event id number |
void |
hello()
A wrapper method for printEvents |
void |
identifyAdjTheme(Event e)
check if a sentence contains an adjective that could add data to an event |
void |
identifyAdjType(Event e)
|
void |
identifyEvent(java.lang.String s)
check if a sentence contains a event definition, and initiate further logic. |
void |
identifyITVerb(java.lang.String s)
check if a sentence contains an intrasitive verb, and possibly initiate event |
void |
identifyNoun(java.lang.String s)
check if a sentence contains a noun and initiate event logic. |
void |
identifyNREL(Event e)
check if a sentence contains a noun relation, and possibly add into to already existing event |
void |
identifySREL(Event e)
|
void |
identifySREL2(Event e,
java.lang.String skNum)
|
void |
identifyTransVerb(java.lang.String s)
check if a sentence contains a verb, and initiate event logic. |
void |
printEvents()
Echo the events in this TQL to stdout |
java.lang.String |
prolog(java.lang.String s)
|
void |
resolveSkolemns()
map all skolemns in this TQL to their appropriate class |
java.lang.String |
sk(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public OntologyParser op
public TQLAbstract parent_abstract
public java.util.ArrayList<java.lang.String> statements
public java.util.ArrayList<Event> events
public java.util.HashMap<java.lang.String,java.lang.String> nouns
public int input
public int block
public int eventcounter
public final boolean debug_tql
Constructor Detail |
---|
public TQL(int input, int block, TQLAbstract par, OntologyParser op)
input
- the sentence numberblock
- number of successfully parsed sentences including this onepar
- parent abstractop
- the ontologyparser used to determine significance of wordsMethod Detail |
---|
public void addLine(java.lang.String line)
line
- the statement to be addedpublic java.util.ArrayList getLines()
public void hello()
printEvents()
public java.util.ArrayList getEvents()
public void printEvents()
public int getNextEvID()
public void extractEvents()
findNoun()
,
findVerb()
,
findEvent()
public void findNoun()
identifyNoun(String)
public void findVerb()
identifyTransVerb(String)
,
identifyITVerb(String)
public void findEvent()
identifyEvent(String)
public void resolveSkolemns()
public void identifyNoun(java.lang.String s)
s
- the line of tql codefindNREL(Event)
,
identifyAdjType(Event)
public void identifyTransVerb(java.lang.String s)
s
- the line of tql codeidentifyAdjTheme(Event)
public void identifyEvent(java.lang.String s)
s
- the line of tql codeidentifySREL2(Event,String)
public void identifyITVerb(java.lang.String s)
s
- the line of tql codeidentifySREL(Event)
public java.lang.String prolog(java.lang.String s)
public java.lang.String sk(java.lang.String s)
public void findNREL(Event e)
e
- the event to add data toidentifyNREL(Event)
public void identifyNREL(Event e)
e
- the event to add data toidentifyAdjTheme(Event)
public void identifySREL(Event e)
public void identifySREL2(Event e, java.lang.String skNum)
public void identifyAdjType(Event e)
public void identifyAdjTheme(Event e)
e
- the event to add data topublic java.lang.String escapeRegEx(java.lang.String s)
s
- the string to be escaped
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |