About the Coreference Demo

Coreference determines when two entity mentions in a text refer to the same entity in the world. For this demo, we only consider coreference within a single document.

Genre- and Language-Specific Models

Like the named entity recognizers and sentence recognizers on top of which coreference operates, coreference itself requires a genre- and language-specific model. The models used here are:

The chunker is trained on the MUC 6 corpus, whereas the other models are coded heuristics.

Sentence and Entity Annotation Included

The demos use the appropriate sentence and named entity models. See the Sentence Demo and the Named Entity Demo for more information.

Coreference XML Markup

Entities and sentences are marked as in the named entity demos. Coreference is added as an additional attribute id for each entity. Pronouns that cannot be resolved are assigned an identifier of -1.

Coreference Demo on the Web

The demo is hosted on the web at the following URL:


For detailed information about using web demos, including web form, file upload and web service instructions, see the web demo instructions

Coreference Demo via GUI

To launch the demo in a GUI, first change directories to the command directory and then invoke the demo batch script. Note: Parameters are set in the GUI, not as arguments to the launch script.

Windows Operating System

> cd %LINGPIPE_HOME%\demos\generic\bin
> gui_coref_en_news_muc6.bat 

Unix-like Operating Systems

> cd %LINGPIPE_HOME%\demos\generic\bin
> sh gui_coref_en_news_muc6.sh

For detailed information about running demos in a GUI, see the GUI demo instructions

Coreference Demo via Shell Command

Shell commands may be run over single files, all of the files in a directory, or using standard input/output.

Running over a Directory

> cd $LINGPIPE/demos/generic/bin
> cmd_coref_en_news_muc6.bat -inDir=../../data/testdir -outDir=/testout

Running a Single File

> cd $LINGPIPE/demos/generic/bin
> cmd_coref_en_news_muc6.bat -inFile=../../data/testdir/foo.txt -outFile=foo.out.xml

Running through a Pipe (Standard input/output)

> cd demos/generic/bin
> echo See Spot. See Spot run. | cmd_ne_en_news_muc6.bat

Running in Unix-like Operating Systems

For unix-like operating systems such as Unix, Solaris, Linux, or Macintosh OS X:

For detailed information about running demos from the command line, see the command line demo instructions

Coreference Demo Scripts

The following scripts are available in $LINGIPE/demos/generic/bin for running the demo. Note that each script comes in four flavors, distinguishing command line from GUI, and the Windows DOS shell from the Unix shell.

Language Genre Corpus Mode Windows DOS Unix/Linux/Mac sh
English News MUC 6 Command cmd_coref_en_news_muc6.bat cmd_coref_en_news_muc6.sh
GUI gui_coref_en_news_muc6.bat gui_coref_en_news_muc6.sh

Coreference Demo Parameters

The following is a complete list of parameters for the demo.

General Demo Parameters

These parameters apply to every version (web/GUI/command) of every demo.

Parameter Description Usage Constraints
inCharset Input character set Optional. Defaults to platform default.
outCharset Output character set
contentType Input content type May be one of:
  • text/plain
  • text/html
  • text/xml
Defaults to text/plain.
removeElts Element tags to remove Optional. May only be used with contentType=text/html or contentType=text/xml. Each value may be comma-separated list. If neither of these are specified, all text content is processed.
includeElts Elements to annotate

Command-Line Only Parameters

These parameters apply to every command-line demo, but are not relevant for the GUI or web versions of the demos.

Parameter Description Usage Constraints
inFile Readable input file May not be used with inDir. If either is not specified, defaults to standard input or output.
outFile Writeable output file
inDir Readable input directory May not be used with inFile or outFile. If used, inDir and outDir must both be specified.
outDir Writeable output directory