Skip to content

UCREL/pymusas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

50c03c0 Β· Aug 19, 2024
May 9, 2023
Mar 28, 2022
Mar 29, 2022
Aug 17, 2023
May 4, 2022
Sep 20, 2021
Jan 25, 2022
Apr 4, 2022
Oct 12, 2021
Nov 1, 2021
Jun 2, 2022
May 4, 2022
Jan 6, 2022
Jan 5, 2022
Nov 17, 2021
Jun 2, 2022
Jan 18, 2022
Aug 19, 2024
Feb 8, 2023
Jan 18, 2022
Dec 7, 2021
Mar 18, 2022
Mar 29, 2022
Mar 31, 2022
Oct 6, 2021

Repository files navigation

PyMUSAS

Python Multilingual Ucrel Semantic Analysis System, is a rule based token and Multi Word Expression semantic tagger. The tagger can support any semantic tagset, however the tagset we have concentrated on and released pre-configured spaCy components for is the Ucrel Semantic Analysis System (USAS).


CI License Code coverage

PyPI Version Supported Python Versions

Number of PyMUSAS PyPI downloads for the last month Launch Binder

Documentation

  • πŸ“š Usage Guides - What the package is, tutorials, how to guides, and explanations.
  • πŸ”Ž API Reference - The docstrings of the library, with minimum working examples.
  • πŸš€ Roadmap

Language support

PyMUSAS currently support 10 different languages with pre-configured spaCy components that can be downloaded, each language has it's own guide on how to tag text using PyMUSAS. Below we show the languages supported, if the model for that language supports Multi Word Expression (MWE) identification and tagging (all languages support token level tagging by default), and size of the model:

Language (BCP 47 language code) MWE Support Size
Mandarin Chinese (cmn) βœ”οΈ 1.28MB
Welsh (cy) βœ”οΈ 1.09MB
Spanish, Castilian (es) βœ”οΈ 0.20MB
Finnish (fi) ❌ 0.63MB
French (fr) ❌ 0.08MB
Indonesian (id) ❌ 0.24MB
Italian (it) βœ”οΈ 0.50MB
Dutch, Flemish (nl) ❌ 0.15MB
Portuguese (pt) βœ”οΈ 0.27MB
English (en) βœ”οΈ 0.88MB

Install PyMUSAS

Can be installed on all operating systems and supports Python version >= 3.7, to install run:

pip install pymusas

Development

When developing on the project you will want to install the Python package locally in editable format with all the extra requirements, this can be done like so:

pip install -e .[tests]

For a zsh shell, which is the default shell for the new Macs you will need to escape with \ the brackets:

pip install -e .\[tests\]

Running linters and tests

This code base uses flake8 and mypy to ensure that the format of the code is consistent and contain type hints. The flake8 settings can be found in ./setup.cfg and the mypy settings within ./pyproject.toml. To run these linters:

isort pymusas tests scripts
flake8
mypy

To run the tests with code coverage (NOTE these are the code coverage tests that the Continuos Integration (CI) reports at the top of this README, the doc tests are not part of this report):

coverage run # Runs the tests (uses pytest)
coverage report # Produces a report on the test coverage

To run the doc tests, these are tests to ensure that examples within the documentation run as expected:

coverage run -m pytest --doctest-modules pymusas/ # Runs the doc tests
coverage report # Produces a report on the doc tests coverage

Team

PyMUSAS is an open-source project that has been created and funded by the University Centre for Computer Corpus Research on Language (UCREL) at Lancaster University. For more information on who has contributed to this code base see the contributions page.

About

Python Multilingual Ucrel Semantic Analysis System

Topics

Resources

License

Citation

Stars

Watchers

Forks

Packages

No packages published

Languages