A Python library for detecting lexical borrowings (with a focus on anglicisms in Spanish language)
Project description
pylazaro
A library for lexical borrowing detection (a.k.a loanwords) in Spanish, with a focus on anglicism detection.
Installation
To install pylazaro simply run the following command from the command line:
pip install pylazaro
To uninstall pylazaro simply run the following command from the command line:
pip uninstall pylazaro
Get started
A working example on how to detect borrowings in a text using pylazaro:
>>> from pylazaro import Lazaro
# We create our borrowing detection tagger
>>> tagger = Lazaro()
# The text we want to analyze for borrowing detection
>>> text = "Inteligencia artificial aplicada al sector del blockchain, la e-mobility y las smarts grids entre otros; favoreciendo las interacciones colaborativas."
# We run our tagger on the text we want to analyze
>>> result = tagger.analyze(text)
# We get results
>>> result.borrowings_to_tuple()
[('blockchain', 'en'), ('e-mobility', 'en'), ('smarts grids', 'en')]
>>> result.tag_per_token()
[('Inteligencia', 'O'), ('artificial', 'O'), ('aplicada', 'O'), ('al', 'O'), ('sector', 'O'), ('del', 'O'), ('blockchain', 'B-ENG'), (',', 'O'), ('la', 'O'), ('e-mobility', 'B-ENG'), ('y', 'O'), ('las', 'O'), ('smarts', 'B-ENG'), ('grids', 'I-ENG'), ('entre', 'O'), ('otros', 'O'), (';', 'O'), ('favoreciendo', 'O'), ('las', 'O'), ('interacciones', 'O'), ('colaborativas', 'O'), ('.', 'O')]
More info
- Documentation on how to use
pylazaroin Read the docs. - The code is available on GitHub.
pylazarogives access to the models described on this ACL paper- Questions? Bugs? Requests? Ideas? Feel free to reach me via email, open a GitHub issue or ping me on Twitter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylazaro-1.1.21.tar.gz.
File metadata
- Download URL: pylazaro-1.1.21.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c38f3b8cabe43c285748a012ece68794a53c8f64d9e86acca817b2e7decd7a21
|
|
| MD5 |
b9d6af49f3b6870fc01361b9097158d4
|
|
| BLAKE2b-256 |
1bf30b09039a2aad1ad81c49731f249db2ae5d33c1954895b8f08be5265e7bee
|
File details
Details for the file pylazaro-1.1.21-py3-none-any.whl.
File metadata
- Download URL: pylazaro-1.1.21-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab93fca0dcc0f539a8f7a70df251378773a556edcfa65ca3cddffd31aeeb68a0
|
|
| MD5 |
ea488316e3a42d9d64742659a202d3a2
|
|
| BLAKE2b-256 |
db91a14f26dc121f3cebb1d117a82692eedeeeff112fbdc48045265dbe6c1457
|