• Jump To … +
    abbreviations.js adjectives.js convertables.js dates.js demonyms.js firstnames.js honourifics.js irregular_nouns.js irregular_verbs.js misc.js multiples.js numbers.js organisations.js phrasal_verbs.js places.js uncountables.js verbs.js fns.js index.js lexicon.js negate.js passive_voice.js contractions.js fancy_lumping.js grammar_rules.js parts_of_speech.js phrasal_verbs.js tagger.js word_rules.js question.js sentence.js statement.js tense.js adjective.js to_adverb.js to_comparative.js to_noun.js to_superlative.js adverb.js to_adjective.js is_acronym.js article.js date.js date_rules.js is_date.js parse_date.js is_plural.js is_uncountable.js noun.js is_organisation.js organisation.js gender.js is_person.js parse_name.js person.js is_place.js place.js pluralize.js pronoun.js singularize.js is_value.js numbers.js to_number.js units.js value.js term.js conjugate.js from_infinitive.js predict_form.js suffix_rules.js to_actor.js to_infinitive.js negate.js verb.js sentence_parser.js text.js
  • misc.js

  • ¶
    'use strict';
    
    const misc = {
    
      'etc': 'FW', //foreign words
      'ie': 'FW',
    
      'there': 'NN',
    
      'better': 'JJR',
      'earlier': 'JJR',
    
      'has': 'VB',
      'more': 'RB',
    
      'sounds': 'VBZ'
    };
    
    const compact = {
  • ¶

    conjunctions

      'CC': [
        'yet',
        'therefore',
        'or',
        'while',
        'nor',
        'whether',
        'though',
        'because',
        'but',
        'for',
        'and',
        'if',
        'however',
        'before',
        'although',
        'how',
        'plus',
        'versus',
        'not'
      ],
    
      'VBD': [
        'where\'d',
        'when\'d',
        'how\'d',
        'what\'d',
        'said',
        'had',
        'been',
        'began',
        'came',
        'did',
        'meant',
        'went'
      ],
    
      'VBN': [
        'given',
        'known',
        'shown',
        'seen',
        'born',
      ],
    
      'VBG': [
        'going',
        'being',
        'according',
        'resulting',
        'developing',
        'staining'
      ],
  • ¶

    copula

      'CP': [
        'is',
        'will be',
        'are',
        'was',
        'were',
        'am',
        'isn\'t',
        'ain\'t',
        'aren\'t'
      ],
  • ¶

    determiners

      'DT': [
        'this',
        'any',
        'enough',
        'each',
        'whatever',
        'every',
        'which',
        'these',
        'another',
        'plenty',
        'whichever',
        'neither',
        'an',
        'a',
        'least',
        'own',
        'few',
        'both',
        'those',
        'the',
        'that',
        'various',
        'what',
        'either',
        'much',
        'some',
        'else',
        'no',
  • ¶

    some other languages (what could go wrong?)

        'la',
        'le',
        'les',
        'des',
        'de',
        'du',
        'el'
      ],
  • ¶

    prepositions

      'IN': [
        'until',
        'onto',
        'of',
        'into',
        'out',
        'except',
        'across',
        'by',
        'between',
        'at',
        'down',
        'as',
        'from',
        'around',
        'with',
        'among',
        'upon',
        'amid',
        'to',
        'along',
        'since',
        'about',
        'off',
        'on',
        'within',
        'in',
        'during',
        'per',
        'without',
        'throughout',
        'through',
        'than',
        'via',
        'up',
        'unlike',
        'despite',
        'below',
        'unless',
        'towards',
        'besides',
        'after',
        'whereas',
        '\'o',
        'amidst',
        'amongst',
        'apropos',
        'atop',
        'barring',
        'chez',
        'circa',
        'mid',
        'midst',
        'notwithstanding',
        'qua',
        'sans',
        'vis-a-vis',
        'thru',
        'till',
        'versus',
        'without',
        'w/o',
        'o\'',
        'a\'',
      ],
  • ¶

    modal verbs

      'MD': [
        'can',
        'may',
        'could',
        'might',
        'will',
        'ought to',
        'would',
        'must',
        'shall',
        'should',
        'ought',
        'shouldn\'t',
        'wouldn\'t',
        'couldn\'t',
        'mustn\'t',
        'shan\'t',
        'shant',
        'lets', //arguable
        'who\'d',
        'let\'s'
      ],
  • ¶

    posessive pronouns

      'PP': [
        'mine',
        'something',
        'none',
        'anything',
        'anyone',
        'theirs',
        'himself',
        'ours',
        'his',
        'my',
        'their',
        'yours',
        'your',
        'our',
        'its',
        'nothing',
        'herself',
        'hers',
        'themselves',
        'everything',
        'myself',
        'itself',
        'her', //this one is pretty ambiguous
        'who',
        'whom',
        'whose'
      ],
  • ¶

    personal pronouns (nouns)

      'PRP': [
        'it',
        'they',
        'i',
        'them',
        'you',
        'she',
        'me',
        'he',
        'him',
        'ourselves',
        'us',
        'we',
        'thou',
        'il',
        'elle',
        'yourself',
        '\'em'
      ],
  • ¶

    some manual adverbs (the rest are generated)

      'RB': [
        'now',
        'again',
        'already',
        'soon',
        'directly',
        'toward',
        'forever',
        'apart',
        'instead',
        'yes',
        'alone',
        'ago',
        'indeed',
        'ever',
        'quite',
        'perhaps',
        'where',
        'then',
        'here',
        'thus',
        'very',
        'often',
        'once',
        'never',
        'why',
        'when',
        'away',
        'always',
        'sometimes',
        'also',
        'maybe',
        'so',
        'just',
        'well',
        'several',
        'such',
        'randomly',
        'too',
        'rather',
        'abroad',
        'almost',
        'anyway',
        'twice',
        'aside',
        'moreover',
        'anymore',
        'newly',
        'damn',
        'somewhat',
        'somehow',
        'meanwhile',
        'hence',
        'further',
        'furthermore'
      ],
  • ¶

    interjections

      'UH': [
        'uhh',
        'uh-oh',
        'ugh',
        'sheesh',
        'eww',
        'pff',
        'voila',
        'oy',
        'eep',
        'hurrah',
        'yuck',
        'ow',
        'duh',
        'oh',
        'hmm',
        'yeah',
        'whoa',
        'ooh',
        'whee',
        'ah',
        'bah',
        'gah',
        'yaa',
        'phew',
        'gee',
        'ahem',
        'eek',
        'meh',
        'yahoo',
        'oops',
        'd\'oh',
        'psst',
        'argh',
        'grr',
        'nah',
        'shhh',
        'whew',
        'mmm',
        'yay',
        'uh-huh',
        'boo',
        'wow',
        'nope'
      ],
  • ¶

    nouns that shouldnt be seen as a verb

      'NN': [
        'president',
        'dollar',
        'student',
        'patent',
        'funding',
        'morning',
        'banking',
        'ceiling',
        'energy',
        'secretary',
        'purpose',
        'friends',
        'event'
      ]
    };
  • ¶

    unpack the compact terms into the misc lexicon..

    const keys = Object.keys(compact);
    for (let i = 0; i < keys.length; i++) {
      const arr = compact[keys[i]];
      for (let i2 = 0; i2 < arr.length; i2++) {
        misc[arr[i2]] = keys[i];
      }
    }
  • ¶

    console.log(misc.a);

    module.exports = misc;