|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlingscope.drivers.SentenceTagger
public class SentenceTagger
Tags scope or cue in a single sentence
Field Summary | |
---|---|
static java.lang.String |
CUE_INTER
|
static java.lang.String |
CUE_START
|
static java.lang.String |
OTHER
|
static java.lang.String |
SCOPE_INTER
|
static java.lang.String |
SCOPE_START
|
Constructor Summary | |
---|---|
SentenceTagger()
|
Method Summary | |
---|---|
static java.util.List<AnnotatedSentence> |
annotateSentences(Annotator annotator,
java.util.List<java.lang.String> inputSentences,
boolean isTokenized)
|
static Annotator |
getAnnotator(java.lang.String classifierType,
java.lang.String markType)
Gets the Annotator from the given classifier and mark type |
static java.util.List<java.lang.String> |
getStringList(java.lang.String inputFile,
boolean isAnnotated)
Gets the list of sentences in string format from the given inputFile. |
static java.util.List<java.lang.String> |
getStringListFromAnnotatedSentences(java.util.List<AnnotatedSentence> annotatedSentences)
Given a list of annotated sentences, return a list where the annotated sentences are replaced with strings |
static void |
main(java.lang.String[] args)
|
static AnnotatedSentence |
tag(Annotator annotator,
java.lang.String sentence,
boolean isTokenized)
Tags the given sentence with the given annotator |
static void |
usage()
Prints the usage for the sentence tagger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CUE_START
public static final java.lang.String CUE_INTER
public static final java.lang.String SCOPE_START
public static final java.lang.String SCOPE_INTER
public static final java.lang.String OTHER
Constructor Detail |
---|
public SentenceTagger()
Method Detail |
---|
public static AnnotatedSentence tag(Annotator annotator, java.lang.String sentence, boolean isTokenized)
annotator
- sentence
- isTokenized
-
public static void usage()
public static java.util.List<java.lang.String> getStringListFromAnnotatedSentences(java.util.List<AnnotatedSentence> annotatedSentences)
annotatedSentences
-
public static java.util.List<AnnotatedSentence> annotateSentences(Annotator annotator, java.util.List<java.lang.String> inputSentences, boolean isTokenized)
public static java.util.List<java.lang.String> getStringList(java.lang.String inputFile, boolean isAnnotated)
inputFile
- the file containing input sentencesisAnnotated
- set this as true if the input file contains annotated
sentences. Set this as false if the input file contains only sentences
as strings
public static Annotator getAnnotator(java.lang.String classifierType, java.lang.String markType)
classifierType
- such as "baseline", "crf", or "negex"markType
-
public static void main(java.lang.String[] args)
args
- 0 - Annotator type ("cue" or "scope")
1 - Model type ("crf", "baseline" or "negex")
2 - Saved model file
3 - Sentence to tag
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |