1.0.6 • Published 8 years ago

ogden v1.0.6

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
8 years ago

ogden

Basic English tokenizer.

Requirements

  • Set

Example

const ogden = require("ogden");

let tokens = ogden("Whether you use constructors or literals, your regular expressions can include the following elements and flags. The elements describe the pattern you want to match, while the flags specify how the matching should be performed.");

The tokens variable will now be an Object of categorized tokens:

{
  "adjectives": [
    "be"
  ],
  "compound": [],
  "directions": [
    "in",
    "on",
    "to"
  ],
  "international": [
    "liter",
    "you"
  ],
  "qualitiesGeneral": [
    "regular"
  ],
  "qualitiesOpposites": [
    "low"
  ],
  "pronouns": [
    "he",
    "i",
    "it",
    "me",
    "us",
    "you"
  ],
  "operations": [
    "a",
    "at",
    "be",
    "for",
    "he",
    "how",
    "i",
    "in",
    "on",
    "or",
    "the",
    "to",
    "while",
    "you"
  ],
  "thingsGeneral": [
    "form",
    "use"
  ],
  "thingsPicturable": [
    "ant",
    "flag",
    "match",
    "wing"
  ],
  "verbs": [
    "be"
  ]
}

How can I load ogden?

ogden supports AMD loaders (require.js, curl.js, etc.), node.js & npm (npm install ogden), or using a script tag.

License

Copyright (c) 2016 Jason Mulligan Licensed under the BSD-3 license

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago