Class: NHKore::BasicCleaner

Inherits:
Cleaner
  • Object
show all
Defined in:
lib/nhkore/cleaner.rb

Overview

Author:

  • Jonathan Bradley Whited

Since:

  • 0.2.0

Direct Known Subclasses

BestCleaner

Instance Method Summary collapse

Methods inherited from Cleaner

#begin_clean, #clean, clean_any

Instance Method Details

#end_clean(str) ⇒ Object

Since:

  • 0.2.0



61
62
63
64
65
66
67
68
69
70
# File 'lib/nhkore/cleaner.rb', line 61

def end_clean(str)
  # This is very simple, as Splitter will split on punctuation,
  #   and Polisher will remove the leftover punctuation, digits, etc.
  # If this is stricter, then errors will be raised in ArticleScraper's
  #   scrape_dicwin_word() & scrape_ruby_word().

  str = Util.unspace_web_str(str) # Who needs space in Japanese?

  return str
end