Skip to content

Commit

Permalink
Fixing tokenization bug causing single quotes to not be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Dutro committed Feb 4, 2013
1 parent 475ffcf commit 371869c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/twitter_cldr/tokenizers/base.rb
Expand Up @@ -34,7 +34,7 @@ def tokenize_format(text)
content = token.match(regexes[token_type][:content])[1] content = token.match(regexes[token_type][:content])[1]
ret << CompositeToken.new(tokenize_format(content)) ret << CompositeToken.new(tokenize_format(content))
else else
ret << Token.new(:value => token, :type => token_type) # .gsub(/\A\'/, "").chomp("'") ret << Token.new(:value => token, :type => token_type)
end end
end end
ret ret
Expand Down
Expand Up @@ -20,7 +20,7 @@ def initialize(options = {})
DateTokenizer::TOKEN_SPLITTER_REGEX, DateTokenizer::TOKEN_SPLITTER_REGEX,
TimeTokenizer::TOKEN_SPLITTER_REGEX TimeTokenizer::TOKEN_SPLITTER_REGEX
), ),
:else => // :else => /([^\s]+)/ # groups of non-space chars
} }


@token_type_regexes = { @token_type_regexes = {
Expand Down

0 comments on commit 371869c

Please sign in to comment.