Example #1
0
def lookup(word):
        key = 'edc4b9b94b341eeae350e087c2e05d2f5a2a9e0478cefc6dc'
        w = wordnik.Wordnik(key)
        definitions = w.word_get_definitions(word)
        if definitions:
        	return definitions
        else:
        	return None
Example #2
0
 def setUp(self):
     self.key = 'deadbeef'
     self.w = wordnik.Wordnik(api_key=self.key)
Example #3
0
 def setUp(self):
     self.key = 'deadbeef'
     self.w = wordnik.Wordnik(api_key=self.key)
     self.w._do_http = fake_do_http
     self.response = fake_do_http(None, None)
Example #4
0
# Kelly Peterson
# LING 575
# Recursive scraper of unigrams definitions from Wordnik

import sys
import os

import wordnik
# for tokenization
import nltk

wordnik_client = wordnik.Wordnik(
    api_key="ab88a4a190f2ab375a40b0b0c5409582034389dd77022d8d0")
wordnik_sourceDictionary = 'ahd'

wordDict = {}


def GetFileCountFromPath(path):
    count = 0

    for root, dirs, files in os.walk(path):
        for filename in files:
            count += 1

    return count


def ScrapeFile(dir, filename):
    # variable to keep track if we are still in the header
    header = 1