LBJ2.nlp.seg
Class SegmentTagPlain

java.lang.Object
  extended by LBJ2.nlp.seg.SegmentTagPlain

public class SegmentTagPlain
extends java.lang.Object

Use this command line program to produce textual segment annotations on an input text using a learned Word classifier.

Usage

java LBJ2.nlp.seg.SegmentTagPlain <word classifier> <input file> [<parser>]

Input

The first command line parameter specifies the fully qualified class name (e.g. myPackage.myClass) of a Word classifier whose predictions either are equal to "O" or begin with "B-" or "I-". The second command line parameter specifies the relative path to a file containing the plain text to be tagged.

The optional third command line parameter specifies the name of a parser which creates an alternative representation of the user's choice for the plain text words in the input. When this parameter is omitted, PlainToTokenParser is applied to WordSplitter applied to SentenceSplitter which ends up returning Word objects one at a time. If the parameter is given, the specified parser is used in place of PlainToTokenParser. It must be the case that this parser returns objects of a class derived from class Word.

Output

The same text with segment annotations predicted by the specified classifier is produced on STDOUT. Annotated segments will be surrounded by square brackets. The type of the segment (as indicated by the "B-" and "I-" labels after removing those prefixes) appears attached to the opening square bracket.


Constructor Summary
SegmentTagPlain()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentTagPlain

public SegmentTagPlain()
Method Detail

main

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