Skip to content

Releases: mhardalov/bulstem-py

Updated the project's description

06 Aug 17:12
21be38d
Compare
Choose a tag to compare

PyPI package

05 Aug 22:18
e202c27
Compare
Choose a tag to compare

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

Stable packaging

01 Aug 12:04
02ef770
Compare
Choose a tag to compare

Fixed the wheel to contain the rules.

NLTK Removal and Python >= 3.6 only

01 Aug 11:01
b5e42aa
Compare
Choose a tag to compare
  • Removed NLTK as package dependency (only used in the tests)
  • Fixed package dependencies
  • Improved the code style of the probject
  • Dropped Python 2 support

Added pre-defined rule sets to package

11 Aug 10:20
c1d3e57
Compare
Choose a tag to compare

Reading the rules from an external file

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.

Initial Release

11 Jul 15:25
v0.1.0
Compare
Choose a tag to compare

This is the initial release of bulstem_py