src.dackar.text_processing.Abbreviation

Created on March, 2024

@author: wangc, mandd

Attributes

logger

not_acronyms

Classes

Abbreviation

Class to handle abbreviations

Module Contents

src.dackar.text_processing.Abbreviation.logger[source]
src.dackar.text_processing.Abbreviation.not_acronyms = ['was', 'for', 'by', 'me', 'our', 'is', 'he', 'she', 'they', 'him', 'his', 'her', 'them', 'my',...[source]
class src.dackar.text_processing.Abbreviation.Abbreviation[source]

Bases: object

Class to handle abbreviations

type[source]
name[source]
abbreviationSub(text)[source]

Expands the abbreviations in text

Parameters:

text – string, the text to expand

Returns:

string, the text with abbreviations expanded

Return type:

expandedText

updateAbbreviation(abbrDict, reset=True)[source]

Update existing abbreviation dictionary

Parameters:
  • abbrDict – dict, provided abbreviation dictionary

  • reset – boot, True if reset the existing abbreviation dictionary

getAbbreviation()[source]

Get the abbreviation dict