-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sequence_type parameter to cudf::strings::title function #8602
Add sequence_type parameter to cudf::strings::title function #8602
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #8602 +/- ##
================================================
+ Coverage 82.63% 83.00% +0.36%
================================================
Files 109 109
Lines 17869 18222 +353
================================================
+ Hits 14766 15125 +359
+ Misses 3103 3097 -6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small suggestion, rest looks good.
@gpucibot merge |
Closes #8596 #8597
Adds a
sequence_type
parameter to help control how words are delimited within a string when processing thetitle()
logic.The default
ALPHA
type preserves the original behavior which matches with the Pandasstr.title()
where the first character after a non-ALPHA is upper-cased and the rest are lower-cased. Likewise, specifyingALPHANUM
will treat a sequence of alphanumeric characters as a word and upper-case only after a non-ALPHANUM (e.g. whitespace).The
sequence_type
type is declared in thechar_types.hpp
header and so these types can be reused in this API.The following usage should satisfy the #8597 feature request.
The
ALPHANUM
set contains all alphanumeric character types which leaves out onlySPACE
which is the set of whitespace characters.The gtests for
cudf::strings::title()
have been updated to include test-cases usingALPHANUM
.