edu.stanford.nlp.ie
Class NERServer

java.lang.Object
  extended by edu.stanford.nlp.ie.NERServer

public class NERServer
extends Object

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 testString() 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.

Author:
Bjorn Aldag
Copyright © 2000 - 2004 Cycorp, Inc. All rights reserved., Christopher Manning 2006

Constructor Summary
NERServer(int port, AbstractSequenceClassifier asc)
          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

NERServer

public NERServer(int port,
                 AbstractSequenceClassifier asc)
          throws IOException
Creates a new named entity recognizer server on the specified port.

Parameters:
port - the port this NERServer listens on.
Throws:
IOException
Method Detail

run

public void run()
Runs this named entity recognizer server.


main

public static void main(String[] args)
                 throws Exception
Starts this server on the specified port. The classifier used can be either a default one stored in the jar file from which this code is invoked or you can specify it as a filename or as another classifier resource name, which must correspond to the name of a resource in the /classifiers/ directory of the jar file.

Usage: java edu.stanford.nlp.ie.NERServer [-loadFile file|-loadJarFile resource] portNumber

Throws:
Exception


Stanford NLP Group