|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.ie.NERServer
public class NERServer
A named-entity recognizer server for Stanford's NER.
Runs on a socket and waits for text to annotate and returns the
annotated text. (Internally, it uses the classifyString()
method on a classifier, which can be either the default CRFClassifier
which is serialized inside the jar file from which it is called, or another
classifier which is passed as an argument to the main method.
Constructor Summary | |
---|---|
NERServer(int port,
AbstractSequenceClassifier asc,
String charset)
Creates a new named entity recognizer server on the specified port. |
Method Summary | |
---|---|
static void |
main(String[] args)
Starts this server on the specified port. |
void |
run()
Runs this named entity recognizer server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NERServer(int port, AbstractSequenceClassifier asc, String charset) throws IOException
port
- the port this NERServer listens on.asc
- The classifier which will do the taggingcharset
- The character set for encoding Strings over the socket stream, e.g., "utf-8"
IOException
- If there is a problem creating a ServerSocketMethod Detail |
---|
public void run()
public static void main(String[] args) throws Exception
Usage: java edu.stanford.nlp.ie.NERServer [-loadClassifier file|-loadJarClassifier resource|-client] -port portNumber
args
- Command-line arguments (described above)
Exception
- If file or Java class problems with serialized classifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |