public class HMMTagger extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
trace
if true, use HMMannotator trace to write a one-line message about each
part-of-speech assignment to Console.
|
| Constructor and Description |
|---|
HMMTagger()
create a new HMM-based part-of-speech tagger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(Document doc,
Span span,
String type)
tag 'span' of 'doc' according to the Penn Tree Bank tag set.
|
void |
load(String fileName)
load the HMM associated with this tagger from file 'fileName'.
|
void |
prune(Document doc,
Span span)
prune existing 'constit' annotations on 'span' of 'doc' using information
from a part-of-speech tagger.
|
void |
score(Document doc,
Document key)
compare the 'constit' tags of Documents 'doc' and 'key', and report (to
System.out) the agreement rate.
|
void |
store(String fileName)
store the HMM associated with this tagger to file 'fileName'.
|
void |
tagJet(Document doc,
Span span)
tag 'span' of 'doc' according to the Jet part of speech set.
|
void |
tagPenn(Document doc,
Span span)
tag 'span' of 'doc' according to the Penn Tree Bank tag set.
|
public static boolean trace
public void store(String fileName) throws IOException
IOExceptionpublic void load(String fileName) throws IOException
IOExceptionpublic void tagPenn(Document doc, Span span)
public void annotate(Document doc, Span span, String type)
public void score(Document doc, Document key)
public void tagJet(Document doc, Span span)
public void prune(Document doc, Span span)
Copyright © 2016 New York University. All rights reserved.