edu.cmu.minorthird.text
Class MinorTagger

java.lang.Object
  extended by edu.cmu.minorthird.text.AbstractAnnotator
      extended by edu.cmu.minorthird.text.StringAnnotator
          extended by edu.cmu.minorthird.text.MinorTagger
All Implemented Interfaces:
Annotator

public class MinorTagger
extends StringAnnotator

Description: An echo-like server that labels popular entities using XML tags in an input text Instruction: VERY IMPORTANT: 1) Make sure you comment out the following line: require 'pos'; in "lib/mixup/np.mixup" because this server already does POS tagging for you! (otherwise MontyLingua will be invoked more than once) 2) If you encounter 'rcwangName.mixup' not found error, copy apps/names/lib/rcwangName.mixup and apps/names/lib/newnames.txt to lib/mixup, or make sure rcwangName.mixup and newnames.txt are in your classpath 3) To use Minorthird's createXMLmarkup function instead of mine, uncomment the line: tagged = labelsLoader.createXMLmarkup(tempFile.getName(), labels); and comment out the line: tagged = createXML(in, labelsLoader.saveTypesAsXML(labels)); in the "tag" function. To switch back, do the opposite. 4) After connecting to the server, the client can send in any text. The server will buffer the incoming text until it detects that a line is ended with TWO consecutive dollar signs ($$). The server will then process the text in the buffer and echo back the resulting text without disconnecting the client. However, if a line is ended with THREE consecutive dollar signs ($$$), then after the server echos back the resulting text, it will disconnect the connection automatically.

Author:
Richard Wang

Field Summary
 
Fields inherited from class edu.cmu.minorthird.text.StringAnnotator
providedAnnotation
 
Constructor Summary
MinorTagger()
           
 
Method Summary
protected  CharAnnotation[] annotateString(java.lang.String text)
          Override this class to provide the actual annotations for a span.
 java.lang.String explainAnnotation(TextLabels labels, Span documentSpan)
          The implementation for this method should explain how annotation would be added to some part of the text base.
static void main(java.lang.String[] args)
           
static java.lang.String POSTag(java.lang.String text)
          Tag text with part-of-speech (plain text only)
 
Methods inherited from class edu.cmu.minorthird.text.StringAnnotator
closedTypes, doAnnotate
 
Methods inherited from class edu.cmu.minorthird.text.AbstractAnnotator
annotate, annotatedCopy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinorTagger

public MinorTagger()
Method Detail

explainAnnotation

public java.lang.String explainAnnotation(TextLabels labels,
                                          Span documentSpan)
Description copied from class: AbstractAnnotator
The implementation for this method should explain how annotation would be added to some part of the text base.

Specified by:
explainAnnotation in interface Annotator
Specified by:
explainAnnotation in class AbstractAnnotator

main

public static void main(java.lang.String[] args)

annotateString

protected CharAnnotation[] annotateString(java.lang.String text)
Description copied from class: StringAnnotator
Override this class to provide the actual annotations for a span.

Specified by:
annotateString in class StringAnnotator

POSTag

public static java.lang.String POSTag(java.lang.String text)
Tag text with part-of-speech (plain text only)

Parameters:
text -
Returns:
the POS tag as a String