Named Entities Recognition by Token Pair Linking
Project description
NestedNER
Prerequisites
The main requirements are:
- tqdm
- flair
- word2vec
- glove-python-binary==0.2.0
- transformers==2.10.0
- wandb # for logging the results
- yaml
In the root directory, run
pip install -e .
Data Format
{
"id": "train_2975",
"text": "ll Services Plan Documents Only ( Section 125 ) Premium Offset Plan ( POP ) Wellness Plans MBTA Corporate Transit Pass Program WMATA Smar Trip Transit / Parking Program Contact Us HRC Total Solutions 111 Charles Street Manchester , New hampshire 03101 customerservice @ hrcts . com Phone : ( 603 ) 647 - 1147 Fax : ( 866 ) 978 - 7868 Follow Us Linked In You Tube Twitter Resources IIAS Participating Pharmacies IIAS 90 % Merchant List FSA Store HSA St",
"entity_list": [
{"text": "111 Charles Street", "type": "detail", "char_span": [200, 218]},
{"text": "Manchester", "type": "city", "char_span": [219, 229]},
{"text": "New hampshire", "type": "state", "char_span": [232, 245]},
{"text": "03101", "type": "zipcode", "char_span": [246, 251]},
]
}
Pretrained Model and Word Embeddings
Download BERT-BASE-CASED and put it under ../pretrained_models
. Download word embeddings (code: 8044) and put them under ../pretrained_emb
.
Train
Set configuration in tplinker_ner/train_config.yaml
. Start training:
cd tplinker_ner
python train.py
Evaluation
Set configuration in tplinker_ner/eval_config.yaml
. Start evaluation by running tplinker_ner/Evaluation.ipynb
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yucheng_ner-0.3.tar.gz
(17.1 kB
view hashes)
Built Distribution
Close
Hashes for yucheng_ner-0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1655e6d58333e0704e941891db0239fb5972b6234423ae2b02238128fec0f405 |
|
MD5 | f89f8122ceb5371eb3a1695ac7289924 |
|
BLAKE2b-256 | 520fef5a7f63f58a518b8b512b5bf153a4ef5ea3a9b9faa6357c31bb18fcd14e |