Should the result for the word "XxX" really be CASE_x? The code doesn't seem to be used in the project, so the expected result is unclear. Perhaps the input is constrained so that this possibility is avoided.
|
var v = CASE_x |
|
if (uppers == w.length) v = CASE_X |
|
else if (uppers == 1 && w.charAt(0).isUpper) v = CASE_Xx |
|
else if (uppers >= 1 && !w.charAt(0).isUpper) v = CASE_xX |
|
v |
Should the result for the word "XxX" really be CASE_x? The code doesn't seem to be used in the project, so the expected result is unclear. Perhaps the input is constrained so that this possibility is avoided.
processors/library/src/main/scala/org/clulab/sequences/CaseDetector.scala
Lines 23 to 27 in a589771