Bulstem

Latest version: v0.3.3

Safety actively analyzes 613734 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.3

0.3.2

Uploaded the package into the PyPI public repository. Removed dependencies on external libraries.

0.3.1

Fixed the wheel to contain the rules.

0.3.0

- Removed NLTK as package dependency (only used in the tests)
- Fixed package dependencies
- Improved the code style of the probject
- Dropped Python 2 support

0.2.0

Reading the rules from an external file

python
from bulstem.stem import BulStemmer

Pre-defined names of rule sets
PRE_DEFINED_RULES = ['stem-context-1',
'stem-context-2',
'stem-context-3']

Excepted output:
1 втор
2 втори
3 вторият
for i, rules_name in enumerate(PRE_DEFINED_RULES, start=1):
stemmer = BulStemmer.from_file(rules_name, min_freq=2, left_context=i)
print(i, stemmer.stem('вторият'))

stemmer = BulStemmer.from_file('stem_rules_context_2_utf8.txt', min_freq=2, left_context=i)
stemmer.stem('вторият') Excepted output: 1. 'втори'
stemmer.stem('вероятен') Excepted output: 1. 'вероят'


`BulStemmer.from_file` params:
1. `path` - Path (or pre-defined name) to the rules file formatted, as follows: word ==> stem ==> freq.
2. `min_freq` - The minimum frequency of a rule to be used when stemming.
3. `left_context` - Size of the prefix which will not be stemmed.

0.1.0

This is the initial release of `bulstem_py`

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.