python - Get date when a word officially entered the English dictionary -


I am trying to track dates when the English dictionary in different words (Oxford, Merriam-Webster, etc. )

I would ideally like to find an API, so that if I sent 'safe' then I would withdraw '2013' as part of the answer, but I think this data Very common or not easy

  • But neither Unc seems to offer data.

    I am using python and have taken a look here, but no module can be found which will still solve this problem.

    It seems I just have to gather data that I'm looking for by hand, but before I want to see if someone knows better about knowing about it .

    This is a basic script to get the words, if a word has many definitions, then it Only one chooses. Import custom url from BeautifulSoup import BeautifulSoup def render_oxford_uri (word): '' 'Submit the appropriate Oxford Request' '' Base_url = "http: //www.oxforddictionaries .com / definition / english / "url = base_url + ("% s? Cue =% s "% (re.sub (" \ s + "," - ", word), Re.sub (" \ s + " , Word ") , No one, {}) try: feedback = urllib2.urlopen (requested) the_page = response.read () except exception Tax: the_page = "" if_page: pool = BeautifulSoup (the_page) result = Pool.find ("div", attrs = {"class": "entryPageContent"}) If the result: term = re Sult.find ("h2" , Attrs = {"class": "pageTitle"}) speech_part = result.find ("span", attrs = {"class": "partOfSpeech"}) definition = result.find ("span", Attrs = {"class ":" Definition "}) date = result.find (" span ", attrs = {" class ":" date "}) cur_dict = \ {" Term ": term.text," Part speech ":" Speech ", "Definition": Definition. Text, "date": date Text,} rate_list + = [cur_dict] return ret_list if __name__ == "__main__": print get_words ("safe", "vapid")


    Comments

    Popular posts from this blog

    import - Python ImportError: No module named wmi -

    Editing Python Class in Shell and SQLAlchemy -

    c# - MySQL Parameterized Select Query joining tables issue -