FlatEarthTruther/thesaurus-synonyms-index-data


Host: GitHub

License: Unlicense

Language: JavaScript


THESAURUS SYNONYMS INDEX DATA

Data scraped with spiders from thesaurus.com on 2018-03 NPM version Build Status

This package/repo is a dependency of thesaurus-synonyms-data

RELATED PROJECTS

DICTIONARY DEFINITIONS DATA

STATS

$ wc -l index.json
251832 index.json

$ du -sh index.json*
 23M	index.json
1.8M	index.json.zip

INSTALL PACKAGE 📦

npm i -S thesaurus-synonyms-index-data

USAGE

Zip files containing the data get uncompressed during postinstall.

LOAD SYNC

require('thesaurus-synonyms-index-data').loadSync()
[ { url: 'http://www.thesaurus.com/browse/d day',
    text: 'd day',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d days',
    text: 'd days',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d p',
    text: 'd p',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d p s',
    text: 'd p s',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d-day',
    text: 'D-day',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d-days',
    text: 'd-days',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d. p.',
    text: 'd. p.',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d. p. s',
    text: 'd. p. s',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d.p.',
    text: 'D.P.',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d.p.s',
    text: 'd.p.s',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d.t.',
    text: 'd.t.',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d.t.\'s',
    text: 'd.t.\'s',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/d.t.s',
    text: 'd.t.s',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/da',
    text: 'DA',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/da\'s',
    text: 'da\'s',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dab',
    text: 'dab',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dab hand',
    text: 'dab hand',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dab-hand',
    text: 'dab-hand',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabbing',
    text: 'dabbing',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabble',
    text: 'dabble',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabble in',
    text: 'dabble in',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabbled in',
    text: 'dabbled in',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabbler',
    text: 'dabbler',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabbles in',
    text: 'dabbles in',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabbling',
    text: 'dabbling',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabbling in',
    text: 'dabbling in',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dabblings',
    text: 'dabblings',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dachshund',
    text: 'dachshund',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dachshunds',
    text: 'dachshunds',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/f key',
    text: 'F key',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/dactyl',
    text: 'dactyl',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylic',
    text: 'dactylic',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylic hexameter',
    text: 'dactylic hexameter',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylic hexameters',
    text: 'dactylic hexameters',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylogram',
    text: 'dactylogram',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylograms',
    text: 'dactylograms',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylologies',
    text: 'dactylologies',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactylology',
    text: 'dactylology',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dactyls',
    text: 'dactyls',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dad',
    text: 'dad',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daddies',
    text: 'daddies',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daddy',
    text: 'daddy',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daddy longlegs',
    text: 'daddy longlegs',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daddy longlegses',
    text: 'daddy longlegses',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daddy warbuck',
    text: 'daddy warbuck',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daddy warbucks',
    text: 'Daddy Warbucks',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daedal',
    text: 'daedal',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daedalean',
    text: 'Daedalean',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daedalian',
    text: 'Daedalian',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daemon',
    text: 'daemon',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daemons',
    text: 'daemons',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daffodil',
    text: 'daffodil',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daffodils',
    text: 'daffodils',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daffy',
    text: 'daffy',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daft',
    text: 'daft',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daftest',
    text: 'daftest',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daftness',
    text: 'daftness',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/f keys',
    text: 'f keys',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fab',
    text: 'fab',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabber',
    text: 'fabber',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabbest',
    text: 'fabbest',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabian policies',
    text: 'fabian policies',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabian policy',
    text: 'Fabian policy',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabianism',
    text: 'Fabianism',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabianisms',
    text: 'fabianisms',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fable',
    text: 'fable',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabled',
    text: 'fabled',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabler',
    text: 'fabler',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fablers',
    text: 'fablers',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fables',
    text: 'fables',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabric',
    text: 'fabric',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabric softener',
    text: 'fabric softener',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabric softeners',
    text: 'fabric softeners',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabricate',
    text: 'fabricate',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabricated',
    text: 'fabricated',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabricatings',
    text: 'fabricatings',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabrication',
    text: 'fabrication',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabricator',
    text: 'fabricator',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabrics',
    text: 'fabrics',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabulist',
    text: 'fabulist',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabulize',
    text: 'fabulize',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/fabulized',
    text: 'fabulized',
    letter: 'f' },
  { url: 'http://www.thesaurus.com/browse/daftnesses',
    text: 'daftnesses',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dagger',
    text: 'dagger',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daggers',
    text: 'daggers',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dagwood',
    text: 'Dagwood',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dagwood sandwich',
    text: 'dagwood sandwich',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dagwood-sandwich',
    text: 'dagwood-sandwich',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dagwoods',
    text: 'dagwoods',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dahlia',
    text: 'dahlia',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dahlias',
    text: 'dahlias',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/dailies',
    text: 'dailies',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily',
    text: 'daily',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily bread',
    text: 'daily bread',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily breads',
    text: 'daily breads',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily dozen',
    text: 'daily dozen',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily expense allowance',
    text: 'daily expense allowance',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily expense allowances',
    text: 'daily expense allowances',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily grind',
    text: 'daily grind',
    letter: 'd' },
  { url: 'http://www.thesaurus.com/browse/daily record',
    text: 'daily record',
    letter: 'd' },
  ... 251731 more items ]

LOAD ASYNC

require('thesaurus-synonyms-index-data').load(function(err, data) {
    if (err) throw err;
    console.log(data[1].text)
});
'd days'

FIND SYNC EXAMPLE

var _ = require('lodash');
var data = require('thesaurus-synonyms-index-data').loadSync();

function findSync(word) {
  return _.find(data, function(o) {
    return o.text === word.toLowerCase();
  } );
}
findSync('dabbling');
{ url: 'http://www.thesaurus.com/browse/dabbling',
    text: 'dabbling',
    letter: 'd' }

FIND ASYNC EXAMPLE

var _ = require('lodash');
var load = require('thesaurus-synonyms-index-data').load;

function find(word, callback) {
  load(function(err, data) {
    if (err) callback(err);
    var result = _.find(data, function(o) {
      return o.text === word.toLowerCase();
    } );
    callback(null, result);
  });
}
find('dabbling', function(err, data) {
    if (err) throw err;
    console.log(data);
});   
{ url: 'http://www.thesaurus.com/browse/dabbling',
    text: 'dabbling',
    letter: 'd' }

JSONLINES FORMAT

Look at test.js to find out more about the object structure.

"letter" - str - word begins with this letter
"url" - str - word thesaurus.com url
"text" - str - word text

SAMPLE WORD - daftest

{ url: 'http://www.thesaurus.com/browse/daftest',
    text: 'daftest',
    letter: 'd' }

TESTS

Accepted param --verbose or -v to get detailed output of data being tested.

npm test -- --verbose
# or
npm run test
# or
node --max_old_space_size=4096 ./test.js -v
# or
./test.js

Should say: All tests passed!

Please note some of the data files are so large that they had to be left out of the tests, in fact some of the data files will give you FATAL ERROR when you try to load them, in that case give node more memory when you run the script, node --max_old_space_size=4096 test.js, increase size as necessary.

LICENSE

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

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 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.

For more information, please refer to http://unlicense.org

Project Statistics

Sourcerank 3
Repository Size 0 Bytes
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 3
Contributors 1
Tags 1
Created
Last updated
Last pushed

Top Contributors See all

Alex Goretoy

Packages Referencing this Repo

thesaurus-synonyms-index-data
INDEX - Words synonyms data scraped with spiders from thesaurus.com
Latest release 1.0.0 - Published

Recent Tags See all

1.0.0 July 24, 2018

Something wrong with this page? Make a suggestion

Last synced: 2018-07-24 06:56:19 UTC

Login to resync this repository