Skip to content

Commit

Permalink
0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 24, 2014
0 parents commit 6beb5b3
Show file tree
Hide file tree
Showing 19 changed files with 202,967 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
bower_components
components
.DS_Store
coverage
*.log
136 changes: 136 additions & 0 deletions .jscs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireMultipleVarDecl": true,
"requireBlocksOnNewline": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowEmptyBlocks": true,
"disallowSpacesInsideObjectBrackets": true,
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"requireSpacesInsideObjectBrackets": "all",
"disallowDanglingUnderscores": true,
"requireSpaceAfterObjectKeys": true,
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": [
"?",
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!==",
">",
">=",
"<",
"<="
],
"requireSpaceBeforeBinaryOperators": [
"=",
",",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!=="
],
"requireSpaceAfterBinaryOperators": [
"=",
",",
"+",
"-",
"/",
"*",
"==",
"===",
"!=",
"!=="
],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforeBinaryOperators": [
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!=="
],
"requireSpaceAfterBinaryOperators": [
"+",
"-",
"/",
"*",
"=",
"==",
"===",
"!=",
"!=="
],
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
"requireCamelCaseOrUpperCaseIdentifiers": true,
"disallowKeywords": ["with"],
"disallowMultipleLineStrings": true,
"disallowMultipleLineBreaks": true,
"validateLineBreaks": "LF",
"validateQuoteMarks": "'",
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"maximumLineLength": 78,
"requireCapitalizedConstructors": true,
"safeContextKeyword": "self",
"requireDotNotation": true,
"disallowYodaConditions": true,
"validateJSDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true
}
}
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
bower_components
components
.DS_Store
coverage
.travis.yml
*.log
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: node_js
script: npm run-script test-travis
node_js:
- '0.10'
- '0.11'
after_script: npm install [email protected] && cat ./coverage/lcov.info | coveralls
deploy:
provider: npm
email: [email protected]
api_key:
secure: Db5Q9sFLrHA/9OsLzI5Os3q7fYzEkMLywIk4nncX+6sbrpvApmMJBTrDpvjzUKM1yChbiWKwRlbF2e42tkAtndOj+4eu9DgM8Ua1P6VFPZa4V5xJP2u5qJMArrn8AIs4VUQN9YfvpfqHlZdbpWAp/vF4Tge/k3qV+ezDx2Awz/0=
on:
repo: wooorm/brill
Empty file added History.md
Empty file.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(The MIT License)

Copyright (c) 2014 Titus Wormer <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
64 changes: 64 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# brill [![Build Status](https://travis-ci.org/wooorm/brill.svg?branch=master)](https://travis-ci.org/wooorm/brill) [![Coverage Status](https://img.shields.io/coveralls/wooorm/brill.svg)](https://coveralls.io/r/wooorm/brill?branch=master)

The part-of-speech tags from the [Brill-tagger](http://en.wikipedia.org/wiki/Brill_tagger): 89,539 unique words/symbols with one or more [tags](Supported-tags.md).

## Installation

npm:
```sh
$ npm install brill
```

Component:
```sh
$ component install wooorm/brill
```

Bower:
```sh
$ bower install brill
```

## Usage

```js
var brill = require('brill');

brill.get('Eric'); // ['NNP']

brill.has('unicorn'); // false
brill.add('unicorn', ['NN']);
brill.get('unicorn'); // ['NN']

brill.remove('unicorn');
brill.get('unicorn'); // null

brill.get('most-contentious'); // ['RBS|JJ']
```

## Capitalisation

Some words are included as all-caps, first-capital, lowercase, or other:

```js
> brill.get('THAT')
[ 'WDT', 'DT' ]
> brill.get('That')
[ 'DT', 'NNP', 'PDT', 'IN', 'RB', 'WP', 'WDT' ]
> brill.get('that')
[ 'IN', 'DT', 'NN', 'RB', 'RP', 'UH', 'WP', 'VBP', 'WDT' ]
```

It is recommended to check a given word first in its original form, and second, if no tags are found, in its lowercase form.

## API

See [the **datamap-interface** API](https://github.com/wooorm/datamap-interface).

## Tags

See [Supported-tags.md](Supported-tags.md).

## License

MIT © Titus Wormer
52 changes: 52 additions & 0 deletions Supported-tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Supported Tags
=================

Additionally to this list, there are also combinations returned, such as `NNP|VBN` for `England-born`.

| tag | description | examples |
| :-: | :---------- | :------- |
| ! | Exclamation mark | “!” |
| # | Pound sign | “#” |
| $ | Dollar sign | “$”, “A$”, “C$”, “HK$”, “M$”… |
| ( | Left paren | “(”, “[”, “{” |
| ) | Right paren | “}”, “)”, “]|
| , | Comma |\*”, “,”, “Freud”, “Wa”, “]\*”… |
| . | Sent-final punctuation | “.”, “?”, “B.”, “J.M.”, “also”… |
| : | Mid-sent punctuation | “%...”, “\*”, “-”, “:”, “Also...”… |
| ; | Semicolon | “;” |
| CC | Coordinating conjunction | “&”, “AND”, “An”, “And”, “Both”… |
| DT | Determiner | “A”, “AN”, “All”, “An”, “Another”… |
| EX | Existential there | “There”, “ther”, “there”, “x-There” |
| FW | Foreign Word | “A”, “A.D.”, “ASPIS”, “Adios”, “Agile”… |
| IN | Preposition | “@”, “AS”, “AT”, “About”, “Above”… |
| JJ | Adjective | “%”, “-ing”, “/”, “A”, “A-1”… |
| JJS | Adjective, superlative | “BEST”, “Best”, “Biggest”, “Budapest”, “Greatest”… |
| JJR | Adjective, comparative | “BIGGER”, “Better”, “Bigger”, “Clearer”, “Colder”… |
| LS | List item marker | “A”, “B”, “B.”, “C”, “C.”… |
| MD | Modal | “Ca”, “Can”, “MIGHT”, “MUST”, “May”… |
| NNP | Proper Noun, singular | “&”, “Samuel”, “A”, “A&E”, “A&M”… |
| NNS | Noun, plural | “A”, “A321s”, “A330-300s”, “ABCs”, “ACCEPTANCES”… |
| NN | Noun, singular or mass | “%”, “%CHG”, “+”, “Yr.”, “aminometha”… |
| NNPS | Proper noun, plural | “A”, “ACCEPTANCES”, “ACCOUNTS”, “ADRs”, “ADS”… |
| PDT | Predeterminer | “ALL”, “All”, “Both”, “Half”, “Many”… |
| POS | Possessive ending | “S” |
| PRP | Personal pronoun | “A”, “Ah”, “Ahm”, “HE”, “He”… |
| PRP$ | Possessive pronoun | “HIS”, “His”, “Its”, “My”, “Our”… |
| RB | Adverb | “A.D.”, “A.M”, “A.M.”, “AHEAD”, “About”… |
| RBS | Adverb, superlative | “Best”, “Hardest”, “Most”, “Worst”, “best”… |
| RBR | Adverb, comparative | “Better”, “Closer”, “Earlier”, “Easier”, “Further”… |
| RP | Particle | “AWAY”, “Back”, “Howard”, “IN”, “ON”… |
| SYM | Symbol | “%”, “&”, “\*”, “+”, “<”… |
| TO | "to" | “TO”, “To”, “na”, “to” |
| UH | Interjection | “Aaa-ee”, “Aaawww”, “Aah”, “Afternoon”, “Ah”… |
| VBP | Verb, non 3rd person, singular, present | “AM”, “ARE”, “ARISE”, “Agree”, “Ai”… |
| VBD | Verb, past tense | “ADDED”, “ADMITTED”, “ADOPTED”, “AGREED”, “ALLOWED”… |
| VBG | Verb, present participle/gerund | “Absorbing”, “Accepting”, “According”, “Accounting”, “Acting”… |
| VBN | Verb, past participle | “Absorbed”, “Accelerated”, “Accepted”, “Accompanied”, “Accrued”… |
| VB | Verb, base form | “%”, “A”, “Abandon”, “Absent”, “Accept”… |
| VBZ | Verb, 3rd singular present | “APPEARS”, “Adds”, “Ai”, “Aims”, “Answers”… |
| WP$ | Possessive-Wh | “whose” |
| WDT | Wh-determiner | “THAT”, “That”, “WHAT”, “WHICH”, “What”… |
| WRB | Wh-adverb | “How”, “Howda”, “WHEN”, “Whah”, “When”… |
| WP | Wh-pronoun | “That”, “WHAT”, “WHO”, “Wha”, “What”… |
| \`\` | Quote | “Chill.\`\`”, “Co.\`\`”, “Hammer.\`\`”, “Plaintiffs\`\`”, “\`”… |.
36 changes: 36 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "brill",
"main": "index.js",
"description": "Part-of-speech tags from the Brill-tagger",
"license": "MIT",
"keywords": [
"brill",
"word",
"list",
"part",
"speech",
"part-of-speech",
"pos",
"post"
],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/brill.git"
},
"authors": [
"Titus Wormer <[email protected]>"
],
"dependencies": {
"datalist-interface": "~0.0.1"
},
"ignore": [
".*",
"*.log",
"*.md",
"component.json",
"package.json",
"coverage",
"node_modules",
"spec"
]
}
Loading

0 comments on commit 6beb5b3

Please sign in to comment.