Skip to content

Commit

Permalink
Minor enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
agordillo committed Apr 24, 2016
1 parent ea15ec8 commit 5ded34c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ gem 'thinking-sphinx', '3.1.4'

group :development, :test do
# Call 'debugger' anywhere in the code to stop execution and get a debugger console
gem 'debugger'
# gem 'debugger'
end

group :development do
Expand Down
8 changes: 0 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger (1.6.8)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.5)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.8)
descriptive_statistics (2.4.0)
devise (3.4.1)
bcrypt (~> 3.0)
Expand Down Expand Up @@ -236,7 +229,6 @@ DEPENDENCIES
axlsx (= 2.0.1)
capistrano (= 2.14.2)
coffee-rails (= 4.1.0)
debugger
descriptive_statistics (= 2.4.0)
devise (= 3.4.1)
faker (= 1.5.0)
Expand Down
2 changes: 1 addition & 1 deletion app/models/recommender_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def self.processFreeText(text)
end

def self.normalizeText(text)
I18n.transliterate(text.gsub(/([\n])/," ").downcase.strip)
I18n.transliterate(text.gsub(/([\n])/," ").strip, :locale => "en").downcase
end

# Term Frequency (TF)
Expand Down
10 changes: 10 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# encoding: utf-8

en:
i18n:
transliterate:
rule:
ª: "ª"
º: "º"
´: "´"
?: "?"
¿: "¿"
¡: "¡"
́ : ""
activerecord:
errors:
messages:
Expand Down

0 comments on commit 5ded34c

Please sign in to comment.