Saravanan666/pypi-org huggingface dataset:
Package: textmining
This package contains a variety of useful functions for text mining in Python.
It focuses on statistical text mining (i.e. the bag-of-words model) and makes it
very easy to create a term-document matrix from a collection of documents. This
matrix can then be read into a statistical package (R, MATLAB, etc.) for further
analysis. The package also provides some useful utilities for finding
collocations (i.e. significant two-word phrases), computing the edit distance
between words, and chunking long documents up into smaller pieces.The package has a large amount of curated data (stopwords, common names, an
English dictionary with parts of speech and word frequencies) which allows the
user to extract fairly sophisticated features from a document.This package does NOT have any natural language processing capabilities such as
part-of-speech tagging. Please see the Python NLTK for that sort of
functionality (plus much, much more).
Package: textmining3
textmining3Text Mining Utilities for Python 3Free software: GNU General Public License v3Documentation:https://textmining3.readthedocs.io.Requires Python >= 3.6FeaturesThis package contains a variety of useful functions for text mining in Python 3.It focuses on statistical text mining (i.e. the bag-of-words model) and makes it
very easy to create a term-document matrix from a collection of documents. This
matrix can then be read into a statistical package (R, MATLAB, etc.) for further
analysis. The package also provides some useful utilities for finding
collocations (i.e. significant two-word phrases), computing the edit distance
between words, and chunking long documents up into smaller pieces.The package has a large amount of curated data (stopwords, common names, an
English dictionary with parts of speech and word frequencies) which allows the
user to extract fairly sophisticated features from a document.This package does NOT have any natural language processing capabilities such as
part-of-speech tagging. Please see the Python NLTK for that sort of
functionality (plus much, much more).The original code and documentation is available in PyPI under the package nametextmining. This package is a port to Python 3 and published in PyPI under the package
name textmining3, and is based on the original.CreditsThe originaltextmining1.0 package code was authored by Christian Peccei <cpeccei@hotmail.com>This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.1.0 (2018-13-19)Add new feature to export DTM to pandas.DataFrame1.0.2 (2018-12-19)First port of textmining to Python 31.0.0 (2010-01-11)Original release of textmining on PyPI (seehttps://pypi.org/project/textmining/1.0/)
Package: text-models
Twitter is perhaps the social media more amenable for research.
It requires only a few steps to obtain information, and there are
plenty of libraries that can help in this regard. Nonetheless,
knowing whether a particular event is expressed on Twitter is a
challenging task that requires a considerable collection of tweets.
This library aims to facilitate, to a researcher interested, the process
of mining events on Twitter by opening a collection of processed
information taken from Twitter since December 2015. The events could be
related to natural disasters, health issues, and people’s mobility,
among other studies that can be pursued with the library proposed.
In summary, the Python library retrieves a plethora of information in
terms of frequencies by day of words and bi-grams of words for Arabic,
English, Spanish, and Russian languages. As well as mobility information
related to the number of travels among locations for more than 200 countries or territories.The documentation is onreadthedocs.
Package: text-mods
Text Formatting Toolkittext_mods is a Python module for formatting text strings in various ways. It includes functions for removing HTML tags and punctuation, replacing words with synonyms, applying different formatting styles such as bold, italic and colored text. In addition it performs natural language processing tasks such as entity recognition, word frequency counting and text summarization.FeaturesText Cleaning: Remove HTML tags, punctuation, and numbers from text.Text Formatting: Apply styles like bold, italic, underline, and color.NLP Tasks: Perform entity recognition, word frequency counting, and summarization.Text Transformation: Replace words with synonyms, translate text, and more.Sentiment Analysis: Analyze the sentiment of text.Customization: Extensive options for text processing tailored to specific needs.RequirementsMake sure you have the following requirements installed before running the code:Python 3.6 or higherNLTK library: Install NLTK using 'pip install nltk'NLTK WordNet databasegensim librarygoogletrans libraryspacy libraryen_core_web_sm package for SpacyInstallationInstall Python 3.6 or higher from the official website: [Here] (https://www.python.org/downloads/)Install the NLTK library by runningpip install nltkin your terminal or command prompt.Download the WordNet database by running the following commands in a Python interpreter:importnltknltk.download('wordnet')nltk.download('stopwords')nltk.download('averaged_perceptron_tagger')Install gensim usingpip install gensimInstall googletrans usingpip install googletransInstall spacy usingpip install spacyDownload the en_core_web_sm package for Spacy by runningpython -m spacy download en_core_web_smInstall the gensim, googletrans, and spacy libraries by runningpip install gensim googletrans spacyDownload the en_core_web_sm package for Spacy by runningpython -m spacy download en_core_web_smDownload or clone the code from the Github repository:GithubCloneClone the repository using gitgitclonehttps://github.com/Ilija-nik1/text_mods.gitUsageHere are some examples of how to use the functions in the modulefromtext_modsimportremove_html_tags,make_bold,replace_with_first_synonym,make_coloredtext='<h1>Hello, world!</h1>'text=remove_html_tags(text)text=make_bold(text)print(text)# <b>Hello, world!</b>text='This is a sample sentence.'text=replace_with_first_synonym(text)text=make_colored(text,'red')print(text)# <span style="color:red">This is a sampling sentence.</span>For more information on each function, please refer to the docstrings in the code.ContributingIf you find any bugs or have suggestions for new features, please open an issue or pull request on the Github repository.LicenseThis code is licensed under the MIT License.
Package: textnets
textnetsrepresents collections of texts as networks of documents and
words. This provides novel possibilities for the visualization and analysis of
texts.Network of U.S. Senators and words used in their official statements
following the acquittal vote in the 2020 Senate impeachment trial (source).textnetsis free software under the terms of the GNU General Public License
v3.The ideas underlyingtextnetsare presented in this paper:Christopher A. Bail, “Combining natural language processing and network
analysis to examine how advocacy organizations stimulate conversation on social
media,”Proceedings of the National Academy of Sciences of the United States
of America113, no. 42 (2016), 11823–11828, doi:10.1073/pnas.1607151113.Initially begun as a Python implementation ofChris Bail’s textnets package
for R,textnetsnow comprises several unique features for term extraction
and weighing, visualization, and analysis.Featurestextnetsbuilds onspaCy, a state-of-the-art library for
natural-language processing, andigraphfor network analysis. It uses theLeiden algorithmfor community detection, which is able to perform community
detection on the bipartite (word–group) network.textnetsis installable using theconda,pipandnixpackage
managers. It requires Python 3.8 or higher.textnetsintegrates seamlessly with Python’s excellentscientific stack.
That means that you can usetextnetsto analyze and visualize your data in
Jupyter notebooks!Readthe documentationto learn more about
the package’s features.CitationUsingtextnetsin a scholarly publication? Please cite this paper:@article{Boy2020,author={John D. Boy},title={textnets},subtitle={A {P}ython Package for Text Analysis with Networks},journal={Journal of Open Source Software},volume={5},number={54},pages={2594},year={2020},doi={10.21105/joss.02594},}Learn MoreDocumentationhttps://textnets.readthedocs.io/Repositoryhttps://github.com/jboynyc/textnetsIssues & Ideashttps://github.com/jboynyc/textnets/issuesConda-Forgehttps://anaconda.org/conda-forge/textnetsPyPIhttps://pypi.org/project/textnets/FOSDEM ’22https://fosdem.org/2022/schedule/event/open_research_textnets/DOI10.21105/joss.02594Archive10.5281/zenodo.3866676
Package: text-normalizer
# text-normalizer[![travis][travis-image]][travis-url][![pypi][pypi-image]][pypi-url][travis-image]: https://img.shields.io/travis/Yoctol/text-normalizer.svg?style=flat[travis-url]: https://travis-ci.org/Yoctol/text-normalizer[pypi-image]: https://img.shields.io/pypi/v/text-normalizer.svg?style=flat[pypi-url]: https://pypi.python.org/pypi/text-normalizerNormalize your Text String.It is a python package that help you normalize your text data and recover it.## InstallUse Python3```> pip install text-normalizer```## Usage```pythonfrom text_normalizer.text_normalizer_collection_library import chinese_charactor_text_normalizer_collection_2input_sentence = "   我在85.33度C買了一杯900──1000元的咖啡    《ohoh》？？ m_m"nor_sentence, meta = chinese_charactor_text_normalizer_collection_2.normalize(input_sentence)print(nor_sentence)> "我在_float_度c買了一杯_int_-_int_元的咖啡 <ohoh>?? m_m"de_sentence = chinese_charactor_text_normalizer_collection_2.denormalize(nor_sentence, meta)print(de_sentence)> "我在85.33度C買了一杯900──1000元的咖啡 《ohoh》？？ m_m",```
Package: textobfuscator
Text ObfuscatorObfuscate your message withText ObfuscatorInstallationpip install -U textobfuscatorUsageimportrandomfromtextobfuscator.obfuscatorimportTextObfuscator# 1. Replace char.# First, now we define rules: replace chars groups.CHARS_GROUPS_SOURCE_MAP=(["😯","🤣"],["❌","✅"],)# 2. Format(Optional)# Second, let's make some rules to fill the vars that we inserted.FORMAT_PREFIX_RULES={"fake_name":lambda:random.choice(("John","Min","William")),"random_weather":lambda:random.choice(("cloudy","rainy","sunny","windy"))}obfuscator=TextObfuscator(replace_source_map=CHARS_GROUPS_SOURCE_MAP,format_prefix_rules=FORMAT_PREFIX_RULES,)Now we have an instance ofTextObfuscator:obfuscator, let's do some obfuscations.fromtextobfuscator.processorimportBreakWord,ObfuscationConfig,Replace# For each obfuscation, we may specify different rules, such as controls for different words or the number of substitutions, so we make rule here first.BREAK_WORDS_RULES=[# We break the word `hello` twice, and put `*` into the middle, like `h*el*lo`BreakWord(word="hello",places=2,fill="*"),# We break the word `world` once, and put `-` into the middle, like `wor-ld`BreakWord(word="world",places=1,fill="-"),]OBFUSCATOR_CONFIG=ObfuscationConfig(# During the entire obfuscation process, we only replace 1 times.replaces=Replace(count=1),break_words=BREAK_WORDS_RULES,)# OK, let's do the obfuscation.>>>original1="hello world!">>>obfuscated=obfuscator.obfuscate(original1,config=OBFUSCATOR_CONFIG)>>>print(obfuscated)>>>h*ell*owor-ld!>>>original2="❌ hi{fake_name}, today's weather is{random_weather}😯">>>obfuscated=obfuscator.obfuscate(original2,config=OBFUSCATOR_CONFIG)>>>print(obfuscated)>>>❌hiJohn,today's weather is windy 🤣# Once more.>>>obfuscated=obfuscator.obfuscate(original2,config=OBFUSCATOR_CONFIG)>>>print(obfuscated)>>>✅hiMin,today's weather is sunny 😯Obfuscation DetailSplit content into segments by every args position.Break words.Break words on each segment.Merge all segments and put back all key args in places.Replace.Temporarily remove all key args.Replace matching chars according to the given mapping table and config.Put back all key args that removed on above in places.Format.Merge thepre-definedkey args and given key args.
Herepre-definedargs means we can create custom var generation rules.
For example, we can pass config like below to let all vars stars wthdigitto autofill in with a real digit, and all vars starts withletterto autofill in with a real letter.
And the var with the same name will also be filled with the same value.# config# {#     "digit": lambda: random.choice(string.digits),#     "letter": lambda: random.choice(string.ascii_letters),# }# before>>>"{digit1}{digit2}{letter2}{digit2}"# after>>>86z6Format and return the content.
Put all args we get to the content, and keep those unknown args in original place.
Package: textode
textodeTextode is a simple tool to create text bots with only one handler.
You can use it for Telegram, VK or any other social network.What is it forTextode helps you buildstatic text bots.Static text botsare bots that has concrete structure, like instruction
on the pill bottle or a movie script. So, perfect examples of what you can do
with this library is instruction bots, text quests, and so on.What is it not forIt is not designed to build bots that use data provided by user
(e.g. store user age).What is the ideaIn textode the main part of the bot is Node. It used to build bot structure.For example, this is the basic bot in textode:Keyboard("Hello! Here is your keyboard.",buttons={"About bot":Text("*about*"),"Bot logo":Image("logo.png"),},)With this structure bot handles "/start" message, responses with
"Hello! Here is your keyboard." text and keyboard of two buttons -
"About bot" that sends text about bot and "Bot logo" that sends image
of bot logo.The main advantage of this approach is that your bot is now defined by
concrete schema. Instead of making handlers you are designing Node structure.Another advantage is that instead of many handlers you now have one.
It works because of Node identity, they all have the same basic fields:title (by parent) - message text that triggers node.text - text that sends back.Because of that, you need to make only one handler that picking right node
(depends on user input), handles if there is no node with this text, or
handles node type (sends keyboard for Keyboard, image for ImageNode etc.).Installationvia pip:pip install textodeor poetry:poetry add textodeExamplesLookherefor usage examples
(aiogramandvkbottleare presented)
with schemas (built byGraphvizwithJetBrains Monofont).
Package: textodon
# Textodon<div style=”display: flex;”>
<a style=”margin-right: 10px;” href=”https://pypi.python.org/pypi/textodon”><img src=”https://img.shields.io/pypi/v/textodon.svg” ></img></a>
<a style=”margin-right: 10px;” href=”https://travis-ci.com/RatulMaharaj/textodon”><img src=”https://img.shields.io/travis/RatulMaharaj/textodon.svg” ></img></a>
<a style=”margin-right: 10px;” href=”https://pyup.io/repos/github/RatulMaharaj/textodon/”><img src=”https://pyup.io/repos/github/RatulMaharaj/textodon/shield.svg” alt=”updates” ></img></a>
</div><div style=”margin: 1em 0;”>
<img  src=”./welcome.gif” alt=”updates” >
</div>Textodon is a mastodon client & CLI that lets you toot from your terminal> This project is not yet ready to be used## LicenseMIT License## FeaturesTODO
Package: texto-no-espelho
texto_no_espelhoDescription.
O pacote texto_no_espleho Ã© usando para:
- Receber um texto qualquer
- imprimir o retorno original e espelhadoInstallationUse the package managerpipto install texto_no_espelhopipinstalltexto_no_espelhoAuthorIsrael RuizLicenseMIT
Package: textoria
Textoria APITextoria API is a simple key-value store API that allows you to store, retrieve, update, and delete key-value pairs. It is built using aiohttp and provides an asynchronous interface for efficient and fast operations.FeaturesStore key-value pairsRetrieve all key-value pairsUpdate the value of a specific keyDelete a specific key-value pairInstallationTo use the Textoria API, simply clone the repository and install the required dependencies:gitclonehttps://github.com/your_username/textoria-api.gitcdtextoria-api
pipinstall-rrequirements.txtUsageFirst, you need to instantiate theTextoriaclass with the API URL:fromtextoriaimportTextoriaapi_url="https://example.com/api"textoria=Textoria(api_url)Get all keysTo retrieve all the key-value pairs stored in the system, you can use theget_all_keysmethod:keys=awaittextoria.get_all_keys()print(keys)Create a new key-value pairTo create a new key-value pair, use thecreate_keymethod with the key and value as arguments:new_key="example_key"new_value="example_value"response=awaittextoria.create_key(new_key,new_value)print(response)Update an existing key-value pairTo update the value of an existing key, use theupdate_keymethod with the key and the new value as arguments:key="example_key"new_value="updated_value"response=awaittextoria.update_key(key,new_value)print(response)Delete a key-value pairTo delete a specific key-value pair, use thedelete_keymethod with the key as argument:key="example_key"response=awaittextoria.delete_key(key)print(response)ContributingContributions are welcome! Please feel free to submit a pull request or open an issue to report bugs or suggest improvements.LicenseThis project is released under theMIT License.
Package: textory
Textory is a python library for the calculation of windowed statistics of arrays.
It can calculate windowed variograms, pseudo-cross variograms and standard statistics like
mean, std, min, max, etc. for rectangular and round windows.
It can also be used conveniently with xarrays and Satpy scenes.Documentation is available athttps://textory.readthedocs.io.InstallationTextory can be installed from PyPI with pip:pipinstalltextory
Package: textoter
textoterSends text messages (SMS) from your mobile phone.
The mobile phone is connected via Bluetooth.
It is written as an alternative to the phone's proprietary interface.FeaturesUse BluetoothImport contacts from phoneContact name completionNotification on message statusTested onSamsumg A41Nokia 800 ToughInstalling TextoterDependenciesTextoter is a Gnome application, written in Python. It uses bluez stack /via/ DBus. The contacts are parsed usingvobject.
To detect phone capabilities, textoter usessdptoolfrombluezpackage.InstallFirst you may need to install dependencies, for instance on Debian derivatives:apt-get install bluez gnome-bluetooth python3-vobject python3-giAnd then textoter:pip install textoterUser interfaceTo be detected by Textoter, your phone should have been connected at least one time with the computer using theGNOME's Bluetooth interface.
Some phones even need to be paired with computer.Starting TextoterFrom GNOME Shell, start to type in the search bartextoterand click when it appears.From command line launch Textoter with:textoterPhone selectionOn startup Textoter detects the available phones and list them inDevices.
Select the phone from this drop-down list.RecipientTo define the recipient, either:type directly the phone number in theTo :field, preferrably in international format+123456789Use phone's contactsFor the latter:load the phone contacts by clicking on thephoneicon-button. Depending on your phone settigs, you may have to confirm that the computer can access phone's contacts.select in the drop-down list the contact. You can also type the contact name and Textoter will propose a list of possible completions.MessageType the message in the text area underMessage.SendClick on theSendbutton. Textoter then transmit the message to the phone. Depending on your phone, you will have to confirm that the computer can access phone messages.QuitClick onQuitbutton. Textoter then save the current phone and exits.
On subsequent launch, textoter will reuse the last phone selected.ContributingBug can be reported onGitHubCreditsWritten by Arnaud Gardelein, using code configuration fromoscopy.
Package: textoutpc
This module contains a BBcode to HTML translator forPlanète Casio. For more information, read the
documentation accessible onthe official website.WarningIf you are accessing this repository fromPlanète Casio’s forge,
keep in mind that it is only a mirror and that the real repository
is locatedin my forgefor now.What is left to doImplement thenot_within_itselfattribute (for[*]).Implement theallowed_tagsattribute to only allow a set of tags within
itself.Implement theonly_allowed_tagsattribute (for[list] blah [*]to
ignoreblahand anything outside of[*]tags which is inallow_tags).Add an[imgurl]tag?Manage lightscript (or even markdown?) as output languages;Check where the errors are to display them to the user:Count character offset, line number and column number in the lexer;Produce readable exceptions;Make a clean interface to transmit them;Check why exceptions on raw tags effectively escape the content, as it
shouldn’t…?Look for security flaws (we really don’t want stored XSS flaws!).Implement match names (such as\[\*+\]for lists).Manage keywords with tags such as[tag key=valueother="somethingelse"].
Package: text-overlay-dataset
TextOverlayDatasetA meta-dataset builder to combine text datasets and image datasets.Recipes:# Basic Minimal Usage:# %pip install text-overlay-datasetfromtext_overlay_datasetimportTextOverlayDatasetfromPILimportImageds=TextOverlayDataset(image_dataset=[Image.new("RGB",(256,256)),],text_dataset=["Hello","World"],font_directory="<path to ttf dir>")composite_image,text,etc=ds[0]# composite_image is the 0th image with a randomly selected text.# text is the given text that was selected.# etc is an object with axis-aligned bounding box, font name, and so on.# If desired, one can specify `randomly_choose='image'` in the constructor# and text will be accessed sequentially with random images instead.# Augmenting the text and making it harder to read by blurring, rotating, etc.fromtext_overlay_datasetimportTextOverlayDatasetfromtorchtext.datasetsimportIMDB# A text dataset should be mappable.fromtorchvision.datasets.fakedataimportFakeData# Any mappable image dataset is fine, or just a list of Images.image_dataset=FakeData(size=100,image_size=(3,256,256),)text_dataset_iter=IMDB(split='train')text_dataset=[label_text[1]forlabel_textintext_dataset_iter]ds=TextOverlayDataset(image_dataset,text_dataset,font_directory="./fonts/",maximum_font_translation_percent=0.5,maximum_font_rotation_percent=0.25,maximum_font_blur=3.0)# Any torchvision transform can be used as part of the preprocessing.# Perhaps your model requires images to be cropped to 512x512.fromtorchvision.transformsimportCenterCropds=TextOverlayDataset(image_dataset=fake_image_dataset,text_dataset=["Hello","World"],# This can also be a PyTorch text dataset.font_directory="fonts",maximum_font_translation_percent=0.4,maximum_font_rotation_percent=0.5,maximum_font_blur=3.0,prefer_larger_fonts=True,pre_composite_transforms=[CenterCrop([512,])],# post_composite_transforms are also possible.)# It's possible to try and fill each image with text.# Set prefer_larger_fonts to use the maximum font size.ds=TextOverlayDataset(image_dataset=fake_image_dataset,text_dataset=["Hello","World"],# This can also be a PyTorch text dataset.font_directory="fonts",prefer_larger_fonts=True,# Or you can specify `font_sizes = [36, 48, ...]`)# If your dataset has a lot of long strings with no line breaks, it might be worth considering setting# 'long_text_behavior' to 'truncate_then_shrink' to avoid lots of null texts.ds=TextOverlayDataset(image_dataset=fake_image_dataset,text_dataset=["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!"],font_directory="fonts",long_text_behavior='truncate_then_shrink',)TODO:Add toggle to prefer larger fonts first?Fix bounds checking on rotation so we don't put text off the edge of the image.Add automatic line-breaking to fix long text inside image areas.Check for sampling biases in the random generations.Support streaming datasets.Verify RTL languages.Verify Unicode line breaks and non-English fonts.