Skip to content

Instantly share code, notes, and snippets.

@danieldk
Created April 17, 2011 17:46
Show Gist options
  • Save danieldk/924275 to your computer and use it in GitHub Desktop.
Save danieldk/924275 to your computer and use it in GitHub Desktop.
Word capitalization
capitalization :: String -> [FeatureValue]
capitalization (x:_)
| isUpper x = [FeatureValue "capitalized" 1]
| otherwise = [FeatureValue "capitalized" 0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment