Class: StyleScanner::SentenceScans::Cliche
- Defined in:
- lib/style_scanner/sentence_scans/cliche.rb
Constant Summary collapse
- STEMMED_CLICHES =
load_file("stemmed_cliches.txt")
- CLICHES =
load_file("cliches.txt")
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.stemmed_cliches ⇒ Object
used for generating new cliches.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from StyleScanner::SentenceScans::Base
Class Method Details
.stemmed_cliches ⇒ Object
used for generating new cliches. see generate_stemmed_cliches.rb
17 18 19 20 21 |
# File 'lib/style_scanner/sentence_scans/cliche.rb', line 17 def stemmed_cliches CLICHES.map do |cliche| cliche.stem_verbs end end |
Instance Method Details
#scan ⇒ Object
8 9 10 11 12 |
# File 'lib/style_scanner/sentence_scans/cliche.rb', line 8 def scan STEMMED_CLICHES.each.with_index do |cliche, index| create_problem(CLICHES[index]) if sentence.contains?(cliche, :stem_verbs => true) end end |