Class: PragmaticSegmenter::Languages::Deutsch::AbbreviationReplacer
- Inherits:
-
AbbreviationReplacer
- Object
- AbbreviationReplacer
- PragmaticSegmenter::Languages::Deutsch::AbbreviationReplacer
- Defined in:
- lib/pragmatic_segmenter/languages/deutsch.rb
Constant Summary
Constants inherited from AbbreviationReplacer
AbbreviationReplacer::KommanditgesellschaftRule, AbbreviationReplacer::MULTI_PERIOD_ABBREVIATION_REGEX, AbbreviationReplacer::PossessiveAbbreviationRule, AbbreviationReplacer::SENTENCE_STARTERS
Instance Attribute Summary
Attributes inherited from AbbreviationReplacer
Instance Method Summary collapse
Methods inherited from AbbreviationReplacer
Constructor Details
This class inherits a constructor from PragmaticSegmenter::AbbreviationReplacer
Instance Method Details
#replace ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/pragmatic_segmenter/languages/deutsch.rb', line 94 def replace @reformatted_text = text.apply(PossessiveAbbreviationRule) @reformatted_text = PragmaticSegmenter::Languages::Deutsch::SingleLetterAbbreviation.new(text: @reformatted_text).replace @reformatted_text = search_for_abbreviations_in_string(@reformatted_text, abbreviations) @reformatted_text = replace_multi_period_abbreviations(@reformatted_text) @reformatted_text = @reformatted_text.apply(AmPmRules::All) replace_abbreviation_as_sentence_boundary(@reformatted_text) end |