public class NERServer
extends java.lang.Object
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.Modifier and Type | Class and Description |
---|---|
static class |
NERServer.NERClient
This example sends material to the NER server one line at a time.
|
Constructor and Description |
---|
NERServer(int port,
AbstractSequenceClassifier asc,
java.lang.String charset)
Creates a new named entity recognizer server on the specified port.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Starts this server on the specified port.
|
void |
run()
Runs this named entity recognizer server.
|
public NERServer(int port, AbstractSequenceClassifier asc, java.lang.String charset) throws java.io.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"java.io.IOException
- If there is a problem creating a ServerSocketpublic void run()
public static void main(java.lang.String[] args) throws java.lang.Exception
java edu.stanford.nlp.ie.NERServer [-loadClassifier fileOrResource|-client] -port portNumber
args
- Command-line arguments (described above)java.lang.Exception
- If file or Java class problems with serialized classifier