src.dackar.text_processing.AbbrExpander

Created on October, 2022

@author: wangc, mandd

Classes

AbbrExpander

Class to expand abbreviations

Module Contents

class src.dackar.text_processing.AbbrExpander.AbbrExpander(abbreviationsFilename, checkerType='autocorrect', abbrType='mixed')[source]

Bases: object

Class to expand abbreviations

abbrType = 'mixed'[source]
checkerType = 'autocorrect'[source]
abbrList[source]
preprocessorList = ['hyphenated_words', 'whitespace', 'numerize'][source]
preprocess[source]
checker[source]
abbrDict[source]
abbrProcess(text, splitToList=False)[source]

Expands the abbreviations in text

Parameters:
  • text – string, the text to expand

  • splitToList – bool, True if splitting the text into sentences, default is False

Returns:

string, the text with abbreviations expanded

Return type:

expandedText