stoneelsie / google-refine

Automatically exported from code.google.com/p/google-refine
Other
0 stars 0 forks source link

Extend toTitlecase() function with support for char[] delimiters in Apache WordUtils #447

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It appears that Refine's ToTitlecase.java does not support the delimiter 
function since Apache WordUtils 2.1

http://commons.apache.org/lang/api-2.5/org/apache/commons/lang/WordUtils.html#ca
pitalizeFully(java.lang.String, char[])

I was trying to get the expected output for Initials support with toTitleCase().

Input string: "C.R. SANDIDGE WINES, INC."
Output result: "C.r. Sandidge Wines, Inc."
Output expected: "C.R. Sandidge Wines, Inc."

Test to try?:

WordUtils.capitalizeFully("C.R. SANDIDGE WINES, INC.", {'.'}) = ??what??

Original issue reported on code.google.com by thadguidry on 9 Sep 2011 at 8:15

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 13 Sep 2011 at 8:42

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r2247.

Original comment by dfhu...@google.com on 19 Sep 2011 at 9:48

GoogleCodeExporter commented 8 years ago
I had started working on this (oops, should have grabbed it as owner), but had 
assumed that Thad wanted to be able to specify the delimiters as an argument in 
GREL.

Thad - can you clarify what you were asking for?

Original comment by tfmorris on 19 Sep 2011 at 3:21

GoogleCodeExporter commented 8 years ago
I had not initially thought about specifying the delimiters, but on second 
thought, this might be only special casing my own needs, hmmm, perhaps beyond 
the English language there might be a need to specify the delimiters.  Will 
that have to be in UTF8 format, I wonder ?  I only know a few punctuation marks 
in Chinese (Mandarin), so not sure about other languages.  I would suggest not 
special casing this, and instead make the user specify the delimiters (in UTF8) 
in the argument.

Original comment by thadguidry on 19 Sep 2011 at 3:29

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 12 Dec 2011 at 7:49