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()
[('blockchain', 'ENG'), ('e-mobility', 'ENG'), ('smarts grids', 'ENG')]
>>> 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
pylazaro
in Read the docs. - The code is available on GitHub.
pylazaro
gives 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
pylazaro-1.0.12.tar.gz
(13.7 kB
view hashes)
Built Distribution
pylazaro-1.0.12-py3-none-any.whl
(14.4 kB
view hashes)
Close
Hashes for pylazaro-1.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 169e1959c23e3375d37159b669d971836bf43c4b32aa03427655b42d78310fec |
|
MD5 | 08f54cf7e943e8a874fd09aa4a268393 |
|
BLAKE2b-256 | c364236d4ad885e359c8049ee661a5f0f994ebce51786f7c51570d55d6c45051 |