Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 863 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 863 Bytes

RO Diacritics module

RO Diacritics is a straightforward diacritics restoration module for Romanian Language

from ro_diacritics import restore_diacritics
print(restore_diacritics("fara poezie, viata e pustiu"))

or correcting a pandas dataframe:

from ro_diacritics import restore_diacritics
df['text-diacritice'] = df['text'].apply(restore_diacritics)

Installing

$ python -m pip install ro-diacritics

or

$ pip install ro-diacritics

Requirements

  • torch and torchtext
  • numpy
  • nltk and scikit-learn (for training)
  • needs nltk.download('punkt') for tokenization

References