Code Monkey home page Code Monkey logo

xrenner's Introduction

xrenner

eXternally configurable REference and Non Named Entity Recognizer

https://corpling.uis.georgetown.edu/xrenner/

Usage:

xrenner.py [options] INFILE (> OUTFILE)

Options:

-m, --model input model directory name, in models/, default 'eng'
-o, --output output format, default: sgml; alternatives: html, paula, webanno, conll, onto, unittest
-x, --override specify a section in the model's override.ini file with alternative settings, default=None; possible values such as 'OntoNotes', 'GUM'
-v, --verbose output run time and summary
-t, --test run unit tests and quit
--version print xrenner version and quit

Input format:

1       Wikinews        Wikinews        NP      NNP     _       2       nsubj   _       _
2       interviews      interview       VVZ     VBZ     _       0       root    _       _
3       President       president       NN      NN      _       2       dobj    _       _
4       of      of      IN      IN      _       3       prep    _       _
5       the     the     DT      DT      _       7       det     _       _
6       International   international   NP      NNP     _       7       amod    _       _
7       Brotherhood     brotherhood     NP      NNP     _       4       pobj    _       _
8       of      of      IN      IN      _       7       prep    _       _
9       Magicians       magician        NPS     NNPS    _       8       pobj    _       _

1       Wednesday       Wednesday       NP      NNP     _       0       root    _       _
2       ,       ,       ,       ,       _       0       punct   _       _
3       October October NP      NNP     _       4       nn      _       _
4       9       9       CD      CD      _       1       appos   _       _
5       ,       ,       ,       ,       _       0       punct   _       _
6       2013    2013    CD      CD      _       3       tmod    _       _

Installation:

Download and use the main xrenner.py script on an input file, or install from PyPI and import as a module:

> pip install xrenner

Examples:

  • python xrenner.py example_in.conll10 > example_out.sgml
  • python xrenner.py -x GUM example_in.conll10 > example_out.sgml
  • python xrenner.py -o conll example_in.conll10 > example_out.conll
  • python xrenner.py -m eng -o conll example_in.conll10 > example_out.conll

Module usage:

from xrenner import Xrenner

xrenner = Xrenner()
my_conllx_result = some_parser.parse("John visited Spain. His visit went well.")

print xrenner.analyze(my_conllx_result,"sgml")

xrenner's People

Contributors

amir-zeldes avatar esmanning avatar zangsir avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.