Saravanan666/pypi-org huggingface dataset:
Package: word-gen.py
Word generator packageThis project generates a random picture, typing a table and puts it in a word file.You can specify a clear length of the generated text and the path where the generated file will be saved.Installingpip install word_genHow to usefromword_gen.word_genimportwordrandom_drawing()#This function generates a random picture from geometric shapesget_table()#This function generates a random fixed-sized table of numbersgenerate_random_string(length)#length- number of letters of random text. This function generates a random set of letters of a given lengthmerge(path)#path- selected save path. This function combines several word files into one single file at the specified path. Possibly can be used as a standalone helper library or smth idk ВЇ\_(гѓ„)_/ВЇtrash_clean()#This function cleans up intermediate filesExamplefromword_gen.word_genimportwordrandom_drawing()get_table()generate_random_string(12)merge(r"C:\Users\Cherloy\Desktop\testing\result.docx")trash_clean()
Package: wordgoal
wordgoalwordgoalis a command line tool for graphing your word count toward a goal.Installationwordgoalrequires Python 3.8 or later.pipinstallwordgoalConfigurationwordgoalreads configuration from a YAML file namedwordgoal.ymlinside each directory.For an example, see thewordgoal.ymlfile for this project.Describing your word count goalsIn order of precedence, a document's word count goal can be described by:A Markdown document's goal can be described in its front matter:---
goal:words: 400---# My 400-word short storyIt was the best of times…Any file's goal can be described in its directory'swordgoal.yml:files:short-story.txt:goal:2000long-story.txt:goal:80000To apply the same goal to all the files in a directory, set the default in that directory'swordgoal.yml:default:goal:2000If neither a goal nor a default has been described for a file, a goal of 1,000 words will be assumed.Ignoring files and directorieswordgoaltracks the following files in each directory and subdirectory:*.markdown*.md*.text*.txtTo ignore a specific file or subdirectory, add its name to that directory'swordgoal.yml:ignore:-LICENCE.txt# file-drafts# subdirectoryStyling the outputStyling options can be set in each directory'swordgoal.yml:style:fractions:true# <current word count> / <goal>percentages:trueRelated packageswordgoaluses:cariad/boringmdto extract plain text and front matter from Markdown files.cariad/progrowto render progress bars.Thank you! 🎉My name isCariad, and I'm anindependent freelance DevOps engineer.I'd love to spend more time working on projects like this, but--as a freelancer--my income is sporadic and I need to chase gigs that pay the rent.If this project has value to you, please consider☕️ sponsoringme. Sponsorships grant me time to work onyourwants rather thansomeone else's.Thank you! ❤️
Package: wordhash
wordhashThis project provides a command-line tool and a Python library to do this:Given some arbitrary input data, output a fingerprint of that data in the form
of a string of ordinary English words. If the input data changes even slightly,
then the output will change completely.It uses theEFF's large wordlistas a source of words.Installationpip install wordhashUsageCommand-line interface (CLI)$wordhash-h
usage:wordhash[-h][-wWORDLIST_PATH][-lLENGTH](-fFILE|-sSTRING)options:-h,--helpshowthishelpmessageandexit-wWORDLIST_PATH,--wordlistWORDLIST_PATHPathtoanewline-delimtedfilecontainingwordstobeusedinthewordhash(default:venv/lib64/python3.10/site-packages/wordhash/data/wordlist.txt)-lLENGTH,--lengthLENGTHLengthofhashdigestforthisprogramtouseinternally.Determinesnumberofwordsintheresultingwordhash.(default:8)-fFILE,--fileFILEPathtofiletouseasinputdata(default:None)-sSTRING,--stringSTRINGStringtouseasinputdata(default:None)$wordhash-s'the quick brown fox jumps over the lazy dog'BackstabAuthenticDialDivingModifiedAbridge
$echo-n'the quick brown fox jumps over the lazy dog'>test.tx
t
$wordhash-ftest.txtBackstabAuthenticDialDivingModifiedAbridgePython library>>>importwordhash>>>mydata=b'the quick brown fox jumps over the lazy dog'>>>wordhash.wordhash(mydata)'BackstabAuthenticDialDivingModifiedAbridge'
Package: wordhasher
WordHasherHashes are cool. But gosh they are ugly to read...Let's convert them to verb-noun-adjective form to be more human friendly!We are going to useWordNetto get some words andhashlibto get some hashes.Example>>>fromwordhasherimportWordHasher>>>wh=WordHasher()>>>print(wh)WordHasher:nouns:9698adjectives:3644verbs:2872>>>wh.from_str('This is a test.')catnap-abatic-upshot>>>wh.from_str(__file__)syphon-abashed-decidua>>>wh.sample()keep-vain-smugness-247>>>wh.sample(mode="an")inviting-patrial>>>wh.sample(mode="anN")unsaved-asshole-908CreditsPrinceton University "About WordNet." WordNet. Princeton University. 2010.
Package: wordhoard
Primary Use CaseTextual analysis is a broad term for various research methodologies used to qualitatively describe, interpret and understand text data. These methodologies are mainly used in academic research to analyze content related to media and communication studies, popular culture, sociology, and philosophy. Textual analysis allows these researchers to quickly obtain relevant insights from unstructured data. All types of information can be gleaned from textual data, especially from social media posts or news articles. Some of this information includes the overall concept of the subtext, symbolism within the text, assumptions being made and potential relative value to a subject (e.g. data science). In some cases it is possible to deduce the relative historical and cultural context of a body of text using analysis techniques coupled with knowledge from different disciplines, like linguistics and semiotics.Word frequency is the technique used in textual analysis to measure the frequency of a specific word or word grouping within unstructured data. Measuring the number of word occurrences in a corpus allows a researcher to garner interesting insights about the text. A subset of word frequency is the correlation between a given word and that word's relationship to either antonyms and synonyms within the specific corpus being analyzed. Knowing these relationships is critical to improving word frequencies and topic modeling.Wordhoardwas designed to assist researchers performing textual analysis to build more comprehensive lists of antonyms, synonyms, hypernyms, hyponyms and homophones.InstallationInstall the distribution via pip:pip3installwordhoardGeneral Package UtilizationPlease reference theWordHoard Documentationfor package usage guidance and parameters.SourcesThis package is designed to query these online sources for antonyms, synonyms, hypernyms, hyponyms and definitions:classicthesaurus.comcollinsdictionary.commerriam-webster.comsynonym.comthesaurus.comwordhippo.comwordnet.princeton.eduDependenciesThis package has these core dependencies:backoffBeautifulSoupcloudscraperdeckar01-ratelimitdeepllxmlrequestsurllib3Additional details on this package's dependencies can be foundhere.Development RoadmapIf you would like to contribute to theWordhoardproject please read thecontributing guidelines.Items currently under development:Expanding the list of hypernyms, hyponyms and homophonesAdding part-of-speech filters in queriesIssuesThis repository is actively maintained.  Feel free to open any issues related to bugs, coding errors, broken links or enhancements.You can also contact me atJohn Bumgarnerwith any issues or enhancement requests.SponsorshipIf you would like to contribute financially to the development and maintenance of theWordhoardproject please read thesponsorship information.LicenseThe MIT License (MIT).  Please seeLicense Filefor more information.AuthorCopyright (c) 2020 John Bumgarner
Package: wordhord
wordhord by suizokukan (suizokukan AT orange DOT fr)Public repository of a private project. Copyrighted materials are not included.Note : this Python3 project can’t be used with python2.project’s purposeToolbox to analyse Old English texts.installation$ pip3 install wordhordmoresee README.md file
seehttps://github.com/suizokukan/wordhord
Package: wordhunt-anagram-search-python
WordHuntAnagramPlay iMessage Anagram and wordhunt or any search word game using thismodule.Example`from wordhuntanagram.wordhunt import WordHunt

word = WordHunt(4, 4, args='yiuonhjnhffhggdb', auto_input=False)
word.hunt()
print(word.words)``from wordhuntanagram.anagram import Anagram

anagram = Anagram(args='ioijbf', auto_input=False)
anagram.hunt()
print(anagram.words)`Note that you have to be quick in doing all this. Its advisable to use a while loop.`run = True
while run:
    type_ = input("Choose type: (wordhunt-w/anagram-a)")
    if type_ == 'w' or type_ == 'wordhunt':
        word = WordHunt(4, 4)
        word.hunt()
        for item in word.words:
            print(item, '', word.words[item])
    elif type_ == 'a' or type_ == 'anagram':
        anagram = Anagram(6)
        anagram.hunt()
        for item in word.words:
            print(item, '', word.words[item])
    else:
        print("Input valid type")
    continuation = input("Press y to continue, any key to exit")
    if continuation != 'y':
        run = False
    else:
        ### you can clear the terminal here
        pass`Enjoy!
Package: word-identifiers
word_identifiersThis is a bijection between non-negative integers and lists of words, in English. This is useful to quickly make urls or tokens.Usage>>>fromword_identifiersimportwords_to_id,id_to_words>>>id_to_words(76985270495720357)['head','dance','bully','race','gate','color']>>>words_to_id(['head','dance','bully','race','gate','color'])76985270495720357WordlistThe wordlist used isthis public domain wordlist, compiled byMichael Wehar.
Package: wordiff
WordiffWordiff is designed to identify the most distinctive words when comparing text across different groups. Each word will only appear in one group's wordcloud. It generates unique word clouds for each group, enabling the exploration of the distinct words used in each group individually.ExampleIn the example provided below, a DataFrame is grouped by branch, and the review column is selected to identify the differences in words used across each branch. The words are sorted (and can be analyzed), generating a list of the most frequently used words for each group. This list is then utilized to create unique word clouds for each group, in this case, for each branch.In this example, the word cloud images will not be saved (save_jpg = False), and the threshold is manually set. It is advisable to experiment with different threshold values, and it is recommended to create a column where all stopwords are removed for more accurate results.fromwordiffimportwordiffgrouped=df.groupby('Branch')['review']sorted_words=wordiff.create_sorted_words(grouped)wordiff.create_word_clouds(sorted_words,False,threshold=0.001)InstallationIf you have pip, you can download and install from the PyPI repository:pip install wordiffVersion0.0.1LicenseMITDependenciesThis package uses:pandaswordcloud: WordCloudnltk: FreqDistsklearn.feature_extraction.text: CountVectorizeratplotlib.pyplot: plt
Package: wordify
wordifyWordify is a Python class that converts a given number into its word representation. It can convert numbers up to centillions.UsageFromconverterimport the needed class (you haveIntegerConverterandDecimalConverter)fromwordify.converterimportIntegerConverterfromwordify.converterimportDecimalConverterCreate an instance of theConverterclass by providing a number to be converted.int_number=12345int_converter=IntegerConverter(int_number)dec_number=123.45dec_converter=DecimalConverter(dec_number)Convert the number to its word representation using theconvertmethod.int_word_representation=int_converter.convert()dec_word_representation=dec_converter.convert()Print the word representation.print(int_word_representation)# output: twelve thousand and three hundred forty fiveprint(dec_word_representation)# output: one hundred twenty three point four fiveExamplefromconverterimportIntegerConverter# Create a Converter instance with a numbernumber=12345converter=IntegerConverter(number)# Convert the number to wordsword_representation=converter.convert()# Print the word representationprint(word_representation)# output: twelve thousand and three hundred forty fiveCustomizationYou can set a new number for conversion using theset_numbermethod.converter.set_number(98765)After setting the new number, you need to call theconvertmethod again to obtain the word representation.LicenseThe code in this repository is licensed under the MIT License.You can find the full text of the license in theLICENSEfile. For more information, please visit the repository onGitHub.
Package: word-image
OVERVIEWWordSet provides several ways to generate images of text. Various aspects can be configured to be randomly determined: text font, text color, background color, and padding. Additionally, image augmentation can be applied to the images in order to generate data for contrastive learning approaches.USAGEminimal configurationfrom word_image import WordSet

ws = WordSet()
image = ws.get_wordimage('test')all random featuresfrom word_image import WordSet

ws = WordSet()
generator_fn = ws.get_augword_generator()
image = generator_fn('test')random and fixed image featuresfrom word_image import WordSet

ws = WordSet()
generator_fn = ws.get_augword_generator(
    bg_color=(255,0,0),
    text_color=(0,0,255),
    font_name="times",
    font_size=50,
    x_pad=5,
    y_pad=5,
    config=None)
image = generator_fn('test')batch generationfrom word_image import WordSet

ws = WordSet()

# get wordimages of randomly generated words
words, images = ws.get_random_batch(10)

# get wordimages from sampling a wordlist
wordlist = ['book', 'cat', 'artichoke', 'dinosaur', ...
ws.set_wordlist(wordlist)
words, images = ws.get_wordlist_batch(10)

# get specific wordimages
images = ws.get_batch(wordlist[10:20])INTERFACEcore operationsget_wordimage_generator- get a function that will return wordimages, you can specify which aspects of the resulting images will be constant or random.batch operationsget_random_batch- get a batch of wordimages using randomly generated textget_wordlist_batch- get a batch of wordimages sampled from the wordlistget_batch- get a batch of wordimages from a list of wordswordimage generationget_wordimage- straighforward wordimage generation, returns a black text on white background wordimageconfigurationadd_default_fonts- add a set of fonts to the wordsetadd_font- add a single font to the wordsetset_wordlist- set a list of words to use when sampling wordimagesutility functionsget_imgaug_pipeline- get a function that performs several image augmentation operationsget_random_text- get a randomly generated stringget_biased_rgb- get an RGB color: either a specific color or a randomly generated one. You specify the probability of returning the base color.FONTSBy default, WordSet loads Times New Roman and Arial from themsttcorefontsset, and Computer Modern Serif and Computer Modern Sans Serif from thecmufonts package. In Ubuntu, thses can be installed as follows:sudo apt install ttf-mscorefonts-installer
sudo apt install fonts-cmuThis can be bypassed by setting add_default_fonts to False in the WordSet constructor:from word_image import WordSet

ws = WordSet(add_default_fonts = False)
ws.add_font(<font_name>, <font_path>)LIMITATIONSword_image has only been tested on Ubuntu 20
Package: word-information
word-information: A Fully Functional Dictionary Module for Pythonword-information is a Dictionary Module for Python 3 to get definitions, synonyms, antonyms, and part-of-speech of words.word-information uses requests and bs4 as dependencies and also uses wordset open-source dictionary as a data source.InstallationInstallation is very simple through pippip install word-informationUsageword-information is very easy to useFor example,fromwordInfo.word_informationimportWordInfoword_info=WordInfo()This is will create an instance of the WordInfo class and now it can be used to get meanings, translations etc.For Meanings,print(word_info.get_meaning("chair"))This will return a python dictionary containing the part_of_speech of the word as a key and a list of dictionaries of the meaning and examples, as a value.{'NOUN': [{'meaning': 'a seat, especially for one person, usually having four legs for support and a rest for the back and often having rests for the arms', 'examples': None}, {'meaning': 'something that serves as a chair or supports like a chair', 'examples': ' The two men clasped hands to make a chair for their injured companion'}, {'meaning': 'a seat of office or authority', 'examples': None}]}For Synonyms,print(word_info.get_synonym("glory"))This will return a list of synonyms of the given word['celebrity', 'dignity', 'grandeur', 'greatness', 'honor', 'immortality', 'majesty', 'prestige', 'reputation', 'splendor', 'triumph', 'distinction', 'eminence', 'exaltation', 'illustriousness', 'kudos', 'magnificence', 'nobility', 'praise', 'renown', 'sublimity']For Antonyms,print(word_info.get_antonym("sad"))This will return a list of antonyms of the given word['cheerful', 'glad', 'happy', 'hopeful', 'joyful']AboutCurrent Version: 0.1.5
Created By Bayo Ade October 2022
Package: wordiscovery
新词发现任务是中文自然语言处理的重要步骤。新词有“新”就有“旧”，属于一个相对个概念，在相对的领域（金融、医疗），在相对的时间（过去、现在）都存在新词。文本挖掘会先将文本分词，而通用分词器精度不过，通常需要添加自定义字典补足精度，所以发现新词并加入字典，成为文本挖掘的一个重要工作。单词的定义，来自维基百科的定义如下：在语言学中，单词（又称为词、词语、单字；英语对应用语为“word”）是能独立运用并含有语义内容或语用内容（即具有表面含义或实际含义）的最小单位。单词的集合称为词汇、术语，例如：所有中文单词统称为“中文词汇”，医学上专用的词统称为“医学术语”等。词典是为词语提供音韵、词义解释、例句、用法等等的工具书，有的词典只修录特殊领域的词汇。单从语义角度，“苹果“的法语是”pomme”，而“土豆”的法语是“pomme de
terre”，若按上面的定义，“土豆”是要被拆的面目全非，但“pomme de
terre”是却是表达“土豆”这个语义的最小单位；在机构名中，这类问题出现的更频繁，“Paris
3”是“巴黎第三大学”的简称，如果“Paris”和“3”分别表示地名和数字，那这两个就无法表达“巴黎第三大学”的语义。而中文也有类似的例子，“北京大学”的”北京“和”大学“都可以作为一个最小单位来使用，分别表示”地方名“和“大学”，如果这样分词，那么就可以理解为“北京的大学”了，所以“北京大学”是一个表达语义的最小单位。前几年有部电影《夏洛特烦恼》，我们是要理解为“夏洛特
烦恼“还是”夏洛 特 烦恼“，这就是很经典的分词问题。但是从语用角度，这些问题似乎能被解决，我们知道“pomme de
terre”在日常生活中一般作为“土豆”而不是“土里的苹果”，在巴黎学习都知道“Paris
3”，就像我们提到“北京大学”特指那所著名的高等学府一样。看过电影《夏洛特烦恼》的观众很容易的就能区分这个标题应该看为“夏洛
特 烦恼”。发现新词的方法，《互联网时代的社会语言学：基于SNS的文本数据挖掘》一文，里面提到的给每一个文本串计算文本片段的凝固程度和文本串对外的使用自由度，通过设定阈值来将文本串分类为词和非词两类。原文给了十分通俗易懂的例子来解释凝固度和自动度。这里放上计算方法。这个方法还有许多地方需要优化，在之后的实践中慢慢调整了。环境python >= 3.5安装pythonsetup.pyinstall使用说明importwordiscoveryaswdtext="新词发现任务是中文自然语言处理的重要步骤。新词有新就有旧，属于一个相对个概念，在相对的领域（金融、医疗），在相对的时间（过去、现在）都存在新词。文本挖掘会先将文本分词，而通用分词器精度不过，通常需要添加自定义字典补足精度，所以发现新词并加入字典，成为文本挖掘的一个重要工作。"f=wd.Wordiscovery()# 解析过程默认参数, 根据文本自由调节这几个阈值# 最小信息熵0.01# 最小互信息4# 最小词频2f.parse(text)# f.parse(text, 0.01, 4, 2)# {'分词': (2, 5.18271944179699, 0.6931471805599453),# '字典': (2, 6.2813317304651, 0.6931471805599453),# '文本': (3, 4.895037369345209, 0.6365141682948128),# '文本挖掘': (2, 5.588184549905154, 0.6931471805599453),# '新词': (4, 4.371789225580661, 1.0397207708399179),# '相对': (3, 4.3842117455792184, 0.6365141682948128),# '精度': (2, 6.2813317304651, 0.6931471805599453),# '通常': (2, 5.18271944179699, 0.6931471805599453),# '重要': (2, 5.028568761969732, 0.6931471805599453),# '需要': (2, 5.028568761969732, 0.6931471805599453),# '领域': (2, 6.2813317304651, 0.6931471805599453)}详细说明wordicovery解释
Package: word-knn
word_knnQuickly find closest words using an efficient knn and word embeddings. Uses :faissfor an efficient knn implementationnlpl word embeddingsfor quality word embeddingsInstallationFirst install python3
then :pipinstallword_knnUsageCommand lineJust runpython -m word_knn --word "cat"Details :$python-mword_knn--help
usage:python-mword_knn[-h][--wordWORD][--countCOUNT][--root_embeddings_dirROOT_EMBEDDINGS_DIR][--embeddings_idEMBEDDINGS_ID][--save_zipSAVE_ZIP][--serveSERVE]Findclosestwords.

optionalarguments:-h,--helpshowthishelpmessageandexit--wordWORDword--countCOUNTnumberofnearestneighboors--root_embeddings_dirROOT_EMBEDDINGS_DIRdirtosaveembeddings--embeddings_idEMBEDDINGS_IDwordembeddingsidfromhttp://vectors.nlpl.eu/repository/--save_zipSAVE_ZIPsavethezip(defaultfalse)--serveSERVEservehttpAPItogetnearestwordsPython interfaceFirst go tohttp://vectors.nlpl.eu/repository/and pick some embeddings.
I advise theGoogle News 2013one (id 1).
For these embeddings, you will need about 15GB of disk space and 6GB of RAM.you can also use id 0 which is smaller
(faster to download) but contains much less wordsYou can then run this to get some closest words. This will automatically download and extract the embeddings.fromword_knnimportfrom_nlplclosest_words=from_nlpl("/home/rom1504/embeddings","0",False)print(closest_words.closest_words("cat",10))The word dictionary, embeddings and knn index are then cached. Second run will be much faster.You can also download and extract the embeddings yourself with this :mkdir -p ~/embeddings/0
cd ~/embeddings/0
wget http://vectors.nlpl.eu/repository/11/0.zip
unzip 0.zipfromword_knnimportfrom_csv_or_cacheclosest_words=from_csv_or_cache("/home/rom1504/embeddings/0")print(closest_words.closest_words("cat",10))DevelopmentPrerequisitesMake sure you usepython>=3.6and an up-to-date version ofpipandsetuptoolspython --version
pip install -U pip setuptoolsIt is recommended to installword_knnin a new virtual environment. For
examplepython3 -m venv word_knn_env
source word_knn_env/bin/activate
pip install -U pip setuptools
pip install word_knnUsing Pippip install word_knnFrom SourceFirst, clone theword_knnrepo on your local machine withgit clone https://github.com/rom1504/word_knn.git
cd word_knn
make installTo install development tools and test requirements, runmake install-devTestTo run unit tests in your current environment, runmake testTo run lint + unit tests in a fresh virtual environment,
runmake venv-lint-testLintTo runblack --check:make lintTo auto-format the code usingblackmake black
Package: word-ladder
Find path from one word to another, changing one letter each step, and
each intermediate word must be in the dictionary, the dictionary is a
text file with words separated by a line break like the one found in/usr/share/dict/wordsPrerequisitesPython 3.4 and LinuxList of words separated by newlinesVirtual environment is recommendedDocumentationhttp://word-ladder.readthedocs.ioInstallingFrom PyPi$pipinstallword-ladderManuallyClone the repository (Pypi package comming soon)$gitclonegit@github.com:snebel29/word_ladder.git$cdword_ladder$pipinstall.to install development dependencies as well$pipinstall-e.[dev]Getting startedThe word_ladder packges commes with both, a command line tool and a
module that can be used to find word ladder pathsCommand line toolOnce installed you can use the command line interface$word_ladder-hPython moduleYou can import and use the module directly as well>>>fromword_ladderimportWordLadder>>>wl=WordLadder('tests/word_lists/linux_english_words')>>>wl.find_path('fear','sail')['fear','hear','heir','hair','hail','sail']>>>wl.find_path('Abe','sail')['Abe','be','bed','bid','aid','said','sail']>>>wl.find_path('Am','sail')['Am','am','aim','ail','sail']Running the testsYou will have to use nose to run the tests$nosetestsContributingClone development branch then create pull requests against itReferenceshttps://bradfieldcs.com/algos/graphs/word-ladder/
Package: wordlbot
WordlbotA simple python script to help solve the word game that is all the craze.TL;DR:pip install wordlbotwordlbotDevelopment etc.Just clone the repository and runpython wordle.py. Requires python3.x, no need for any libraries or whatnot.Things worth notingYou can use any words, the helper doesn't care but gives you the best guesses based on feedback on your own word.CARESisstatisticallythe best word to start with, if you are playing the hard mode.This is optimized for the hard mode, so suggestions will always be ones that are valid in it, but it works just as well if you ignore the first 2 suggestions and just go with e.g. "TRAIL - NODES" no matter what the feedback was. Just let the script know the feedback correctly and the 3rd suggestions should be really good.This completely breaks all the "harder" wordle clones with longer words, especially all the 9+ letter variants can almost always be solved in 3 tries, quite often on second ...TodoSomething somethingSeleniumactual automagic.