Skip to content

Commit

Permalink
Prefixes and suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrequina committed Apr 27, 2018
1 parent 5a15ebc commit fdc313e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
26 changes: 24 additions & 2 deletions cebstemmer/stemmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,35 @@ def read_file(name=None, start=None, end=None, strip=False, dict_format=False, d
Fetch prefixes
'''
def prefixes():
return read_file('data/PREF.txt', strip=True)

return ['gipang', 'pinaka', 'isigka', 'inigka',
'tigpa', 'pagka', 'panag', 'manga',
'magka', 'ting', 'tagi', 'taga',
'pina', 'pani', 'pang', 'pala',
'ning', 'nang', 'naka', 'mang',
'mala', 'maki', 'maka', 'kina',
'hing', 'ging', 'nihi', 'gihi',
'nahi', 'kada', 'tig', 'tag',
'sag', 'pan', 'pag', 'nag',
'man', 'mag', 'ika', 'hin',
'pa', 'ni', 'na', 'mo', 'ma',
'ka', 'in', 'ig', 'hi', 'gi',
'ga', 'ba', 'mu' ]

'''
Fetch suffixes
'''
def suffixes():
return read_file('data/SUFF.txt', strip=True)
return ['syon', 'ista', 'ante', 'anan',
'non', 'ito', 'ita', 'ing',
'hon', 'hay', 'han', 'ero',
'era', 'dor', 'ano', 'ado',
'ada', 'oy', 'ot', 'on',
'ng', 'it', 'hi', 'ha',
'es', 'da', 'ay', 'ar',
'an', 'or', 'y', 't',
's', 'o', 'k', 'i',
'g', 'a']

'''
Wrapper for each word with its properties
Expand Down
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
setup(
name = 'cebstemmer',
packages = ['cebstemmer'],
version = '1.3',
version = '1.5',
description = "A Cebuano Stemmer based on Krovetz Algorithm",
author = 'Arjemariel Requina',
author_email = 'rjrequina@gmail.com',
url = 'https://github.com/ajrequina/Cebuano-Stemmer',
download_url = 'https://github.com/ajrequina/Cebuano-Stemmer/archive/1.0.tar.gz',
keywords = ['stemmer', 'cebuano-stemmer'],
classifiers = [],
data_files=[
('data', [
'cebstemmer/data/PREF.txt',
'cebstemmer/data/SUFF.txt',
])
],
install_requires=['cebdict']
)

0 comments on commit fdc313e

Please sign in to comment.