Class: Punkt::Parameters
- Inherits:
-
Object
- Object
- Punkt::Parameters
- Defined in:
- lib/punkt-segmenter/punkt/parameters.rb
Instance Attribute Summary collapse
-
#abbreviation_types ⇒ Object
Returns the value of attribute abbreviation_types.
-
#collocations ⇒ Object
Returns the value of attribute collocations.
-
#orthographic_context ⇒ Object
Returns the value of attribute orthographic_context.
-
#sentence_starters ⇒ Object
Returns the value of attribute sentence_starters.
Instance Method Summary collapse
- #add_orthographic_context(type, flag) ⇒ Object
- #clear_abbreviations ⇒ Object
- #clear_collocations ⇒ Object
- #clear_orthographic_context ⇒ Object
- #clear_sentence_starters ⇒ Object
-
#initialize ⇒ Parameters
constructor
A new instance of Parameters.
Constructor Details
#initialize ⇒ Parameters
Returns a new instance of Parameters.
9 10 11 12 13 14 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 9 def initialize clear_abbreviations clear_collocations clear_sentence_starters clear_orthographic_context end |
Instance Attribute Details
#abbreviation_types ⇒ Object
Returns the value of attribute abbreviation_types.
4 5 6 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 4 def abbreviation_types @abbreviation_types end |
#collocations ⇒ Object
Returns the value of attribute collocations.
5 6 7 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 5 def collocations @collocations end |
#orthographic_context ⇒ Object
Returns the value of attribute orthographic_context.
7 8 9 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 7 def orthographic_context @orthographic_context end |
#sentence_starters ⇒ Object
Returns the value of attribute sentence_starters.
6 7 8 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 6 def sentence_starters @sentence_starters end |
Instance Method Details
#add_orthographic_context(type, flag) ⇒ Object
32 33 34 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 32 def add_orthographic_context(type, flag) @orthographic_context[type] |= flag end |
#clear_abbreviations ⇒ Object
16 17 18 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 16 def clear_abbreviations @abbreviation_types = Set.new end |
#clear_collocations ⇒ Object
20 21 22 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 20 def clear_collocations @collocations = Set.new end |
#clear_orthographic_context ⇒ Object
28 29 30 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 28 def clear_orthographic_context @orthographic_context = Hash.new(0) end |
#clear_sentence_starters ⇒ Object
24 25 26 |
# File 'lib/punkt-segmenter/punkt/parameters.rb', line 24 def clear_sentence_starters @sentence_starters = Set.new end |