Saravanan666/pypi-org huggingface dataset:
Package: wordreference-scraper
wordreference-scraperModule for scraping words in Wordreference.com, from English to Spanish.Multiple languages soon.Usage'wordreference-scraper' is used to scrape words and its meanings from the online dictionary "Wordreference"One wordfromwordreference_scraper.wordreference_scraperimportWordreferenceScraperwords=['get']wordreference_scraper_instance=WordreferenceScraper(words)scraped_words=wordreference_scraper_instance.start()print(scraped_words)# Dictionary where the keys are the forms of the word# and the value is the html of all meanings of that wordMultiple wordsfromwordreference_scraper.wordreference_scraperimportWordreferenceScraperwords=['puzzle','noise','pencil']wordreference_scraper_instance=WordreferenceScraper(words)scraped_words=wordreference_scraper_instance.start()print(scraped_words)Selecting sectionsWordreference has multiple sections where shows the multiple meanings of word, such as 'Principal translations', 'Additional translations', 'Verbal Locutions', and 'Compound Forms'. These are the keys and values for the dictionary of sections to scrapeprincipal_translations - Boolean: Section for Principal Translationsadditional_translations - Boolean: Section for Additional Translationscompound_forms - Boolean: Section for Compound Formslocuciones_verbales - Boolean: Section for "Locuciones Verbales"fromwordreference_scraper.wordreference_scraperimportWordreferenceScraperwords=['Absolute','Note','Self']sections={'principal_translations':True,'additional_translations':True,'compound_forms':False,'locuciones_verbales':False}wordreference_scraper_instance=WordreferenceScraper(words,sections)scraped_words=wordreference_scraper_instance.start()print(scraped_words)ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensewordreference_scraperwas created by Santiago Padron. It is licensed under the terms of the MIT license.Creditswordreference_scraperwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: words
Get large collection of words from books.UsageMake a directory calledbooks/Put.txtfiles in it. Presumably large ones, i.e. books, which are easily available fromGutenberg.Runwords.pyand wait a moment.Receivedictionary.txt.Descriptionwords.pysimply reads each of the books and puts each of the words in a book filtering any that obviously aren’t words (anything containing numbers or punctuation).NOTE: This method may generate non-words which look like words. It is worth revieiwng the lexicon before any serious use.
Package: words2numbers
wordswnumberswords2numbers is a python library for extracting numbers from unstructured text.InstallationUse the package managerpipto install words2numbers.pipinstallwords2numbersUsagefromwords2numbersimportwords2numbersprint(words2numbers("I have six hundred and twenty nine dollars"))[('six hundred and twenty nine',629,{'number_type':'number','span':(7,34),'value_type':'integer'})]ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: words2numsrus
Word-to-Number (Russian)Оригинальный проект:https://github.com/SergeyShk/Word-to-Number-RussianПроект для перевода чисел, записанных в текстовом виде на русском языке.Необходимые библиотекиyargy;natasha.Установка:$ pip install words2numsrusСтруктура проектаnumber.py- грамматики для текстового представления чисел;extractor.py- класс для извлечения чисел;test.py- модуль тестирования.Пример использованияКод:text="Выплаты за второго-третьего ребенка выросли на пятьсот двадцать пять тысячных процента и составили 90 тысяч рублей"extractor=NumberExtractor()formatchinextractor(text):print(match.fact)print(extractor.replace(text))print(extractor.replace_groups(text))Результат:Number(int=2,multiplier=None)Number(int=3,multiplier=None)Number(int=500,multiplier=None)Number(int=20,multiplier=None)Number(int=5,multiplier=0.001)Number(int=90,multiplier=1000)Выплатыза2-3ребенкавырослина500200.005процентаисоставили90000рублей
Выплатыза2-3ребенкавырослина0.525процентаисоставили90000рублей
Package: wordsapy
WordsapyWordsapy is a python integration for theWordsAPI, that allows developers to retrieve information about English words like a dictionary.InstallWordsapy is available on the Python Package Index (PyPI):https://pypi.python.org/pypi/wordsapyYou can install wordsapy using pip.$pipinstallwordsapyUsagesIn order to use WordsAPI you need an API Key.Get you Free API Key:https://rapidapi.com/dpventures/api/wordsapi/pricingSetting your API KeyInitialize aDictionaryobject and set your API Key.fromwordsapyimportDictionarydictionary=Dictionary(api_key='your_api_key')In this way the API Key will be defined as an environment variable, so with doing it only once is more than enough.
Alternatively, you can export your API key as an environment variable.$exportWORDS_API_KEY='your_api_key'Seeexamples/api_key.pyfor other examples.Making queriesOnce done, you can use theDictionaryobject instance to perform queries.Most methods of theDictionaryclass have the same name as WordsAPI endpoints.Check out the API Documentation:https://www.wordsapi.com/docs/Assuming that the API Key is already defined as an environment variable, we retrieve the definitions of the word:example.fromwordsapyimportDictionarydictionary=Dictionary()results=dictionary.definitions('example')forresultinresults:print('Definition: '+result.definition)print('Part of speech: '+result.partOfSpeech)All responses will return aDictObjobject or alistobject. Alldictobjects in the response will be transformed intoDictObj. You can access to the data of aDictObjobject as you would with adictobject, or do it through the attributes. An example to illustrate this:dictionary=Dictionary()word=dictionary.word('example')# It is the same::forword['results'][0]['definition']forword.results[0]['definition']forword['results'][0].definitionforword.results.[0].definition# I love this one# DictObj is iterable:forkey,valueinword.items():print(key)print(value)ExamplesAll usage examples can be found in the/examplesfolder of the projectTestsYou can run the tests via the command line. Your API Key must have been exported as an environment variable.Place your terminal at the root of the project and run the following command.$python-munittestdiscovertests"*_test.py"Greetings@AnthonyBloomerbytmdbv3api, with which I learned how to create a python interface for an API. The wordsapy structure is based on his library.
Package: words-count
Word CountCLI tool for that outputs the N (N by default 100) most common n-word (n by default is 3) sequence in text, along with a count of how many times each occurred in the text.The CLI can get the text on 'stdin' with default params:>$ cat text_file.txt | word-count
...Or using positional arguments:>$ word-count --files text_file.txt
...
>$ word-count --files text_file.txt --number-of-words 4 --top 5
...ImportantIt isnotcase sensitive (e.g. “I love\nsandwiches.” is treated the same as "(I LOVE SANDWICHES!!)")When more than 1 file are passed as argument, each file is processed independently but the series of words are counted together.How to installInstall the cli usingpip>$ pip intall words-count
...Then, it will be available to use:>$ words-count --help
usage: words-count [-h] [-f [FILES ...]] [-n NUMBER_OF_WORDS] [-t TOP]

CLI tool for that outputs the N (N by default 100) most common n-word (n by default is 3) sequence in text, along with a count of how many times each
occurred in the text.

optional arguments:
  -h, --help            show this help message and exit
  -f [FILES ...], --files [FILES ...]
                        Files path to read
  -n NUMBER_OF_WORDS, --number-of-words NUMBER_OF_WORDS
                        Number of words to group
  -t TOP, --top TOP     Max number of groups of words to outputExamples of useProcess tostdin:>$ cat pg2009.txt | words-count
{
    "of the same": 320,
    "the same species": 126,
    "conditions of life": 125,
    "in the same": 116,
    "of natural selection": 107,
    "from each other": 103,
    "species of the": 98,
    "on the other": 89,
    "the other hand": 81,
    "the case of": 78,
    "the theory of": 75,
...Use arguments for adjusting the options:words-count --files pg2009.txt --number-of-words 6 --top 5
{
    "the individuals of the same species": 31,
    "the species of the same genus": 19,
    "we can understand how it is": 13,
    "can understand how it is that": 13,
    "the project gutenberg literary archive foundation": 13
}Process multiple files:words-count --files pg2009.txt pg2009.txt --number-of-words 6 --top 5
{
    "the individuals of the same species": 62,
    "the species of the same genus": 38,
    "we can understand how it is": 26,
    "can understand how it is that": 26,
    "the project gutenberg literary archive foundation": 26
}
Package: words_counter
Words in names counterThis script calculate words count (nouns and verbs) in funcs and vars names in.pyfiles.Script check all folders recursively.Script can clone repo from github&How to installRunpip3 install words_counterRun on CLI for update nltk if it need:$ python3
>> import nltk
>> nltk.download('all')How to useScript have some arguments to run:-p- Projects dirpathes.--all_names- Get all vars and funcs names.--by_type- Get all info by word type.--top_names- Get top funcs and vars names.-d- Clone code from outsource(Github in this version, need repo URL and pathway to create folder)-t- Add word type for search. Avaliable types: NN(Noun), NNS(Nouns), VB(Verb).--data_type- Structure to search choice. Available funcs or vars.--cli- Output result to CLI.--json- Output result to JSON file(need pathway to create json file).--csv- Output result to CSV file(need pathway to create csv file).Attention!In current version-tand--data_typerequired, only if you don’t want use-d.Usage example:We have some folders structure withdclint.py:├── dclint.py
├── django
│   ├── css
│   ├── bootstrap.min.css
│   ├── my_app.py
│
├── flask
│   ├── favicon.ico
│   ├── polls.py
│   ├── garbage_files
│   │   ├──bootstrap.min.js
│   │   ├──html5shiv.min.js
│   │   ├──thrash.py
│
├── myproject
│   ├──ie-emulation-modes-warning.js
│   ├──old_version.py
│   ├──new_file.pyIn all folders - 5.pyfiles.All files have funcs like this (for example):def foo():
   test_var1 = 'test'
   return test_var1def bar():
    test_var2 = 'haha'
    return test_var2if __name__ == '__main__':
    foo_var = foo()
    bar_var = bar()And another funcs.Run check(for example from project folder):$ python words_counter-pmyproject-tvb--data_typefuncs--all_names--cliResult:project: myproject
funcs names:
        foo
        bar
vars names:
        test_var1
        test_var2
        foo_var
        bar_varLicenseMIT license
Package: word-scramble
Python super efficient word scramble finderword scrambleis a python package that looks for all possibilities given a scrambled word.InstallationIf not already,install pipInstall the package withpiporpip3:pipinstallword-scrambleUsagefromwsfinderimportmain# Need to provide the languagefinder=main.Finder("english")scrambled_words=["taurdesta","achwt","ilane","alger",]res={word:finder.find(word)forwordinscrambled_words}print(res)Output:{'taurdesta':['saturated'],'achwt':['watch'],'ilane':['liane','laine','elian','anile','aline','alien'],'alger':['regal','large','lager','glare','elgar','argle'],}
Package: wordscrape
This package contains utilities for extracting form data from Microsoft Word 2007 documents
with the.docxextension. It reads Check Box Form Fields and Text Form Fields, which are
both classified as legacy controls. Subsequent versions will support more kinds of controls.Basic usage example:>>> from wordscrape import WordDocument
>>> doc = WordDocument('form.docx')
>>> data = doc.get_form_data()The functionget_form_datareturns anOrderedDictcontaining all field names and values.Wordscrape can read form data from multiple Word documents, and write the data to a single CSV
file, while ensuring that the field names match.>>> from wordscrape import WordDocument, read_dir, write_csv
>>> path = '/temp/forms/'
>>> all_data = read_dir(path)
>>> write_csv(all_data, 'report.csv')The functionall_datareturns a list of ordered dictionaries, and the functionwrite_csvwrites the data to a CSV file with a header row.
Package: word-search
package: word_searchGitHub:https://github.com/mjaglan/py-word-searchPython package that searches a 2D grid of randomly generated letters (a-z only) for valid English words. Words can be found along any diagonal, forwards, upwards, downwards or backwards and cannot ‘wrap’ between edges. To check if a word is valid, a list of words at res/input/words.txt is used as a reference dictionary.How to run?from word_search import word_search_hashset as hsfrom word_search import word_search_trie as tsRefer client/client_example.py in GitHub athttps://github.com/mjaglan/py-word-search/blob/master/client/client_example.pyto see an example program.
Package: wordseg
wordsegwordsegis a Python package of word segmentation models.Table of contents:InstallationUsageLicenseChangelogContributingCitationInstallationwordsegis available through pip:pipinstallwordsegTo installwordsegfrom the GitHub source:gitclonehttps://github.com/jacksonllee/wordseg.gitcdwordseg
pipinstall-e".[dev]"Usagewordsegimplements a word segmentation model as a Python class.
An instantiated model class object has the following methods
(emulating the scikit-learn-styled API for machine learning):fit: Train the model with segmented sentences.predict: Predict the segmented sentences from unsegmented sentences.The implemented model classes are as follows:RandomSegmenter:
Segmentation is predicted at random at each potential word
boundary independently for some given probability. No training is required.LongestStringMatching:
This model constructs predicted words by moving
from left to right along an unsegmented sentence and
finding the longest matching words, constrained by a maximum word length parameter.Sample code snippet:fromsrc.wordsegimportLongestStringMatching# Initialize a model.model=LongestStringMatching(max_word_length=4)# Train the model.# `fit` takes an iterable of segmented sentences (a tuple or list of strings).model.fit([("this","is","a","sentence"),("that","is","not","a","sentence"),])# Make some predictions; `predict` gives a generator, which is materialized by list() here.list(model.predict(["thatisadog","thisisnotacat"]))# [['that', 'is', 'a', 'd', 'o', 'g'], ['this', 'is', 'not', 'a', 'c', 'a', 't']]# We can't get 'dog' and 'cat' because they aren't in the training data.LicenseMIT License. Please seeLICENSE.txt.ChangelogPlease seeCHANGELOG.md.ContributingPlease seeCONTRIBUTING.md.CitationLee, Jackson L. 2023. wordseg: Word segmentation models in Python.https://doi.org/10.5281/zenodo.4077433@software{leengrams,author={Jackson L. Lee},title={wordseg: Word segmentation models in Python},year=2023,doi={10.5281/zenodo.4077433},url={https://doi.org/10.5281/zenodo.4077433}}
Package: wordslicer
Word SlicerCut your unspaced (or 'too spaced') long texts.Usageimportwordslicermodel=wordslicer.train('train_file')text=open('input_file','r').read()text=wordslicer.separate(model,text)# or wordslicer.join(model, text)save('output_file',text)PerformanceFor an input of:161029 words to train1000 lines to separateThe results:Text with 36889 wordsTime: real    0m1,368sExample:>>> wordslicer.separate(model, "Boromirhesitatedforasecond.'Yes,andno,'heansweredslowly.'Yes:Ifoundhimsomewayupthehill,andIspoketohim.IurgedhimtocometoMinasTirithandnottogoeast.Igrewangryandheleftme.Hevanished.Ihaveneverseensuchathinghappenbefore.thoughIhaveheardofitintales.HemusthaveputtheRingon.Icouldnotfindhimagain.Ithoughthewouldreturntoyou.'")

Boromir hesitated for a second. 'Yes, and no,' he answered slowly. 'Yes: I found him some way up the hill, and I spoke to him. I urged him to come to Minas Tirith and not to go east. I grew angry and he left me. He vanished. I have never seen such a thing happen before. though I have heard of it in tales. He must have put the Ring on. I could not find him again. I though the would return to you.'How to Installpip3 install wordslicerFeaturesTrain your model: with the training ability, this package works with every language.Evaluate your model: check if your training text is good enough for your input text:CreditsThis project was inspired by Generic Human onhttp://stackoverflow.com/a/11642687/2449774.
Thank you!
Package: wordstart
WordStartPrints the words in the given string that start with the given letterFree software: MIT licenseDocumentation:https://wordstart.readthedocs.io.FeaturesStill TODO. Nothing to add here yet. It is a very simple package.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-03-10)First release on PyPI.
Package: wordstats
Statistics about word frequencies in different languages based on a corpus of
movie subtitles as extracted by the Frequency Words (https://github.com/hermitdave/FrequencyWords) project.Currently supported languages (or language codes to be more precise :):"da", "de", "el", "en", "es", "fr", "it", "nl", "no", "pl", "pt", "ro", "zh-CN"Usage ExamplesGetting the info about a given word>> from wordstats import Word
>> print (Word.stats('bleu', 'fr'))
bleu: (lang: fr, rank: 1521, freq: 9.42, imp: 9.42, diff: 0.03, klevel: 2)Comparing the difficulty of two German words>> from wordstats import Word
>> Word.stats('blauzungekrankenheit','de').difficulty > Word.stats('blau','de').difficulty
TrueTop 10 most used words in Dutch>> from wordstats import LanguageInfo
>> Dutch = LanguageInfo.load('nl')
>> print(Dutch.all_words()[:10])
['ik', 'je', 'het', 'de', 'dat', 'is', 'een', 'niet', 'en', 'van']Words common across all the languagesGiven that the corpus is based on subtitles, some common names have sliped in.
Thecommon_words()function returns a list.>> from wordstats.common_words import common_words
>> for each in common_words():
>>     if len(each) > 9:
>>         print(each)
washington
christopher
enterpriseWords that are the same in Polish and Romanian>> from wordstats import LanguageInfo
>> Polish = LanguageInfo.load("pl")
>> Romanian = LanguageInfo.load("ro")
>> for each in Polish.all_words():
>>     if each in Romanian.all_words():
>>         if len(each) > 5 and each not in common_words():
>>             print(each)
telefon
moment
prezent
interes
...Installationpip install wordstats
Package: wordster
Wordster====A simple python wrapper for [Merriam Webster](https://www.merriam-webster.com/) Website. Use it to get meanings of words.Installation============```pip install wordster```Example=======### Code```pythonfrom wordster import wordster# get list of different meanings for a given wordprint wordster.find_meaning("jargon")```### Output```['confused unintelligible language', 'the technical terminology or characteristic idiom of a special activity or group', 'obscure and often pretentious language marked by circumlocutions and long words']```
Package: wordstream
wordstream is a simple corpus of text associations and tools to use them. Feeding the corpus text will grow a stack of left to right word associations on a per word basis. Words are defined (for now) as the bits that sit between whitespace. The corpus can then be eaten: given a word, pop the top of its stack.There are two interfaces to the corpus in the wordstream package:
wordstream and dissociate.  Additional applications of wordstream can
also be imagined.The wordstream source is athttp://k0s.org/hg/wordstreamwordstream interfaceAn interactive interface for eating and feeding the corpus. Wordstream has a command line interface,wordstream, and a web interface usable by runningpaster serve wordstream.ini.  In both cases, the usage is the same. From an initial corpus, the user types lines of text. wordstream will eat the corpus and print a response to the text and feed the user’s lines to the corpusdissociate interfaceNamed after emacs’M-xdissociated-press(try it!), dissociate will feed documents to a corpus, scramble the corpus (shuffle the stack order for each word), and output the corpus eating itself, selecting random words, eating their associations, and then eating the associations of the associations until the corpus is empty.  Dissociate has a command line interface (install the software and rundissociate--helpfor usage), and a web interface usable via paster serve dissociate.ini.ApplicationsWhile the wordstream corpus is a simple model, the basic idea can be
used toThesaurus: By feeding the corpus synonyms, wordstream could be used
as a thesaurus program.  Synonymity could be indicated via either
word count or by position towards the top of the stack.  The
thesaurus could be displayed as a web interface to allow automatic
suggestions while writingWriting analysis:  The amount of text on the web is vast.
Wordstream could be used to present what is being talked about most
within a number of websites and what is associated to it.Collaborative fiction: Since wordstream can use a collective corpus
that is fed by interacting with it, several authors could
simultaneously iteract with the wordstream web interface each
feeding the collective corpus and literally eating each others’
words
Package: words-tui
words-tuiwords-tuiis an app for daily writing in your terminal, built withTextual.Table of ContentsDemoInstallationRunningLicense🎬 Demohttps://github.com/anze3db/words-tui/assets/513444/5f064606-384f-471d-8990-f4681dfff29cInstallationThe easiest way to installwords-tuiis withpipx.pipx install words-tuiAlternatively, you can install it withpip:pip install words-tuiRunningTo runwords-tui, simply run the following command:words-tuiIt stores all of your writing in ~/.words-tui.db by default, but you can override this with theWORDS_TUI_DBenvironment variable or the--dbflag.words-tui --db /path/to/dbLicensewords-tuiis distributed under the terms of theMITlicense.
Package: wordsum
Word SumWordsum is a package for counting words within a folder of files recursively.Usageimportwordsumif__name__=="__main__":print(wordsum.count_words('./example_files',['.md','.ipynb']))wordsum.list_supported_formats()InstallationIf you are using pip:pip install wordsumSupported FormatsCurrently wordsum only supports markdown.mdand jupyter notebooks.ipynb.ContributePRs are welcome for anything!