Skip to content

Instantly share code, notes, and snippets.

@danieldk
Created April 17, 2011 18:39
Show Gist options
  • Save danieldk/924336 to your computer and use it in GitHub Desktop.
Save danieldk/924336 to your computer and use it in GitHub Desktop.
Capitals and numbers
nCapitals :: String -> [FeatureValue]
nCapitals =
return . FeatureValue "capitals" . genericLength . filter isUpper
nNumbers :: String -> [FeatureValue]
nNumbers =
return . FeatureValue "numbers" . genericLength . filter isNumber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment