Skip to main content

System for the IberLEF 2019 NER Task

Project description

Installation instructions

  1. Download and install the latest Anaconda distribution from here

  2. Start the Anaconda Powershell Prompt if running Windows, or a terminal otherwise. Make sure conda is available in the command line path.

  3. Create a conda environment running conda create -n pvcastro-iberlef python=3.6

  4. Update Anaconda running conda update -n base -c defaults conda

  5. Install pytorch running conda install pytorch-cpu -c pytorch -n pvcastro-iberlef

  6. Activate the created conda environment using conda activate pvcastro-iberlef

  7. Install the AllenNLP framework running pip install -U allennlp

  8. Download the spacy model running python -m spacy download en_core_web_sm

  9. Install the pvcastro-iberlef module running pip install -U pvcastro-iberlef


Execution instructions

Run the NER prediction with a command as python -m pvcastro_iberlef.predict_ner --document-path path_to_the_input_document --out-path path_to_the_output_file

Parameters:

  • document-path: path to the document containing the text to be predicted for NER, with one token per line, with sentences separated by blank lines.
  • out-path: path to the document where the predictions results will be written. Must specify a filename. Example: C:\iberlef\predictions.txt

Observations

Since the IberLEF NER model uses two language models based on ELMo, the trained model ended up quite big, with 1.4Gb aproximately. It takes a while to download it the first time, but the model is cached, so following executions after the first will be quicker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pvcastro_iberlef-0.4.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pvcastro_iberlef-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: pvcastro_iberlef-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.7.2

File hashes

Hashes for pvcastro_iberlef-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54b68b0b5aee7cae030fabc7c2768df8278453e5761d869a2d1fdb8f6cff9d98
MD5 5aa13c363b975b0c6790f40c4bc1eb56
BLAKE2b-256 99fa39d88426024f920758414058a64b821ce403398855dcece2e23f9c3f61aa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page