Class: PragmaticSegmenter::Languages::Deutsch::AbbreviationReplacer
- Inherits:
-
AbbreviationReplacer
- Object
- AbbreviationReplacer
- PragmaticSegmenter::Languages::Deutsch::AbbreviationReplacer
- Defined in:
- lib/pragmatic_segmenter/languages/deutsch.rb
Constant Summary collapse
- SENTENCE_STARTERS =
%w( Am Auch Auf Bei Da Das Der Die Ein Eine Es Für Heute Ich Im In Ist Jetzt Mein Mit Nach So Und Warum Was Wenn Wer Wie Wir ).freeze
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
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/pragmatic_segmenter/languages/deutsch.rb', line 68 def replace @text = text.apply( @language::PossessiveAbbreviationRule, @language::SingleLetterAbbreviationRules::All, SingleLowerCaseLetterRule, SingleLowerCaseLetterAtStartOfLineRule) @text = search_for_abbreviations_in_string(@text) @text = replace_multi_period_abbreviations(@text) @text.apply(Languages::Common::AmPmRules::All) replace_abbreviation_as_sentence_boundary(@text) end |