Skip to main content

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', 'ENG'), ('e-mobility', 'ENG'), ('smarts grids', 'ENG')]



# Borrowings from English are labelled ENG, borrowings from other languages OTHER

>>> result.anglicisms_to_tuple()

[('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

Release files for pylazaro 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylazaro 1.2.0
File Size Uploaded
pylazaro-1.2.0.tar.gz 20.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylazaro 1.2.0
File Interpreter ABI Platform
pylazaro-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.7 kB

Release files / pylazaro-1.2.0.tar.gz

Download URL pylazaro-1.2.0.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ecd218a66a3d66b2a768a5d7e8c721d6f1bc85268cb696f6b70e57f94d52a422
BLAKE2b-256 checksum
How to use checksums
136ceaa47b60c6437eb20103f3c95120623228e0ac4d3234c9eefe693a66834b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / pylazaro-1.2.0-py3-none-any.whl

Download URL pylazaro-1.2.0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba52e3db81983bd5b639b57e8b4f43584ed52d15f23eb1f8d4496636baa66192
BLAKE2b-256 checksum
How to use checksums
e6c3fa054f7360d6d4f4b0ed06a0470c0d915bcce6361891a29246bd015a9619
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.21

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page