In name entity recognition projects, we need to pre-process the character in sentences, which need to be converted into numeric features. In this package, we represent each character in two features: (1) vocabulary id, and (2) capitalization type. For example, the first record in the raw data is
(['EU', 'rejects', 'German', 'call', 'to', 'boycott', 'British', 'lamb', '.'], ['ORG', 'O', 'MISC', 'O', 'O', 'O', 'MISC', 'O', 'O'])
the first list in this tuple is the original sentence, the second list in the tuple is the name entity for each character.
Using our package, the raw data bacome
([[1, 12], [2, 11], [3, 13], [4, 11], [5, 11], [6, 11], [7, 13], [8, 11], [9, 14]], [1, 4, 3, 4, 4, 4, 3, 4, 4])
in which the first list is the numeric features for the characters (id, capitalization type), the second list is the corresponding numeric labels for the name entity type.
At the same time, you can also retrieve the vocabulary dictionary built from your sentence data.
To do this, run the following code in terminal
python -m plnlp './plnlp/tiny.conll' './plnlp/tiny.conll'
The first and second arguments are the path of the train dataset and the development dataset, respectively.
The resulting datasets will be written and saved under your current working directory in a csv file.
Metadata
Release files for plnlp 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plnlp-1.0.1.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plnlp-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / plnlp-1.0.1.tar.gz
| Download URL | plnlp-1.0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6409db3be330b0719ae8fdfdaaeae262f13e3d15f153da35d9de904f0d391b76
|
|
BLAKE2b-256 checksum How to use checksums |
fe51285d27afbd060c20c6d696b98ba92dec63e8e4d485ad6af8c485b78faf3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.8
|
Release files / plnlp-1.0.1-py3-none-any.whl
| Download URL | plnlp-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2f64ad997b33ae7e6b8808ca54e6dc05d20c986ea6d16ae2adf80e6c81281d1
|
|
BLAKE2b-256 checksum How to use checksums |
e17114f26958ceb7670ce86de8c58ac491b71cfa0fb9d5dcb9133bd1650741fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.8
|