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::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
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/pragmatic_segmenter/languages/deutsch.rb', line 77 def replace @reformatted_text = text.apply( @language::PossessiveAbbreviationRule, @language::SingleLetterAbbreviationRules::All, SingleLowerCaseLetterRule, SingleLowerCaseLetterAtStartOfLineRule) @reformatted_text = search_for_abbreviations_in_string(@reformatted_text) @reformatted_text = replace_multi_period_abbreviations(@reformatted_text) @reformatted_text = @reformatted_text.apply(Languages::Common::AmPmRules::All) replace_abbreviation_as_sentence_boundary(@reformatted_text) end |