Saravanan666/pypi-org huggingface dataset:
Package: lexicographic-encoding
title: Lexicographic EncodingLexicographic EncodingEasily encode tuples of primitive types to bytestrings preserving lexicographic encoding.
This means that you can later order the resulting bytestring and you will maintain the order of tuples.Use CasesTypically key-value stores only allow to use bytestrings as keys, which are a little awkward to work with if one
needs a bit of structure on them.
For example LevelDB offers a custom comparator to deal with such a situation, but many other storages do not.This package allows you to free from such constraint, using an encoding that maintains the inherent ordering.StabilityThe project is to be considered beta.
The provided API won't change, but it has not been tested in real-world yet (it has a big automated test suite though).Any feedback will be appreciated.
For any question or bug report pleaseopen an issue.Quick Examplefromlexicographic_encodingimportlexpackb,lexunpackb,is_prefix_of# Then pack everything preserving lexicographic order# The following are all Truelexpackb(-1)>lexpackb(-2)lexpackb(102)>lexpackb(20)lexpackb(("Tom",109))>lexpackb(("Tom",18))DocumentationDocumentation of the project can be foundhere.
Package: lexicon-gauthamkrishna9991
LexiconThis is a Verilog Project Manager.This documentation consists of different parts. To go to one click one of the following:Project SpecificationThis descrbes the project specification of the project-manager.InstallationFor Install Instructions, ClickhereLicenseCopyright (c) 2021 Goutham Krishna K VAll rights reserved, as per defined byMIT License
Package: lexicon-overlap-score
Lexicon overlap scoreThe lexicon overlap score is a similarity measure for sentiment lexicons as they are used in Sentiment Classification.InstallationInstall viapip install lexicon_overlap_scoreUsageImport viaimport lexicon_overlap_score as losYour lexicons should be a pandas dataframe with the columnswordandso(semantic orientation).
Then the following three functions can be used.los.simple(lex1,lex2)los.binary(lex1,lex2)los.score(lex1,lex2)simpleandbinaryreturn a value between 0 and 1, whilescorereturns values between -1 and 1.
The functions expect positive words to have a positive value and negative words to have a negative value.If your lexicon is a python dictionary mapping words to values, convert it to a pandas dataframe.importpandasaspddf_lex=pd.DataFrame().from_dict(dict_lex,orient="index").reset_index().rename(columns={"index":"word",0:"so"})Exampleimport pandas as pd
import lexicon_overlap_score as los
df1 = pd.DataFrame([("test",   1), ("free",    1), ("other", 1), ("check", 0.5)], columns=["word", "so"])
df2 = pd.DataFrame([("test", 0.5), ("free",    1)],                               columns=["word", "so"])
los.simple(df1, df2), los.binary(df1, df2), los.score(df1, df2)
Package: lexi-craft
ОписаниеМодель, которая добавляет в текст недостающие пунктуационные знаки и удаляет лишние слова ради лаконичности, используя для этого ChatGPTУстановкаpipinstalllexi_craftНачало# Импортируем модульimportlexi_craft# Вызываем инициализацию# По умалчанию, когда в функцию предаётся None, она берёт OpenAI API# токен из переменной окружения с именем OPENAI_API_KEY. Если изначально# её нет, то происходит попытка загрузить .env файл в папке с проектом.lexi_craft.init()# Функция для обработки "сырого" текста, как аргумента, которая возвращает строку# с уже украшенным текстомlexi_craft.decorate_text("короче забыл чё хотел сказать ну в общем как у тебя дела")# Возвращает текст на подобии этого# Короче, забыл, что я хотел сказать… Ну, в общем, как у тебя дела?
Package: lexifuzz-ner
LexiFuzz NER: Named Entity Recognition Based on Dictionary and Fuzzy MatchingAboutLexiFuzz NER is a Named Entity Recognition (NER) package designed to identify and extract named entities from unstructured text data. Leveraging a combination of dictionary-based and fuzzy matching techniques, LexiFuzz NER offers state-of-the-art accuracy in recognizing named entities in various domains, making it an invaluable tool for information extraction, natural language understanding, and text analytics.RequirementsPython 3.7 or HigherNLTKTheFuzzKey FeaturesDictionary-Based Recognition: LexiFuzz NER utilizes a comprehensive dictionary of named entities, encompassing a wide range of entities such as person names, organizations, locations, dates, and more. This dictionary is continuously updated to ensure high precision in entity recognition.Fuzzy Matching: The package employs advanced fuzzy matching algorithms to identify named entities even in cases of typographical errors, misspellings, or variations in naming conventions. This ensures robustness in recognizing entities with varying textual representations.Customization: LexiFuzz NER allows users to easily customize and expand the entity dictionary to suit specific domain or application requirements. This flexibility makes it adaptable to a wide array of use cases.UsageManual Installation via GithubClone Repositorygit clone https://github.com/hanifabd/lexifuzz-ner.gitInstallationcd lexifuzz-ner && pip install .Installation Using PipInstallationpipinstalllexifuzz-nerInferenceUsagefromlexifuzz_ner.nerimportfind_entitydictionary={'individual_product':['tahapan','xpresi','gold','berjangka'],'brand':["bca","bank central asia"]}text="i wanna ask about bca tahapn savings product"entities=find_entity(text,dictionary,90)print(entities)Result{
    'entities': [
        {
            'id': '55a20c6b-bd4a-43ee-8853-b961ac537ca8',
            'entity': 'bca',
            'category': 'brand',
            'score': 100,
            'index': {'start': 18, 'end': 20}},
        {
            'id': '08917da5-ed51-44bb-9be9-52f17df2640a',
            'entity': 'tahapn',
            'category': 'individual_product',
            'score': 92,
            'index': {'start': 22, 'end': 28}
        }
    ],
    'text': 'i wanna ask about bca tahapn savings product',
    'text_annotated': 'i wanna ask about [bca]{55a20c6b-bd4a-43ee-8853-b961ac537ca8} [tahapn]{08917da5-ed51-44bb-9be9-52f17df2640a} savings product'
}
Package: lexikanon
Lexikanon: A HyFI-based library for TokenizersA HyFI-based library for the creation, training, and utilization of tokenizers.Documentation:https://lexikanon.entelecheia.aiGitHub:https://github.com/entelecheia/lexikanonPyPI:https://pypi.org/project/lexikanonLexikanon is a high-performance Python library specifically engineered for the creation, training, and utilization of tokenizers, which are fundamental components in both natural language processing (NLP) and artificial intelligence (AI). Drawing its name from the Greek words λέξη (meaning "word") and κάνων (meaning "maker"), Lexikanon encapsulates its primary purpose of enabling users to develop robust tokenizers tailored for different languages and specific tasks. Built on theHydra Fast Interface (HyFI)framework, Lexikanon stands as a HyFI-based library. This makes it seamlessly pluggable into any HyFI-oriented project, although it can also function as a standalone library.Citation@software{lee_2023_8248118,
  author       ={Young Joon Lee},
  title        ={Lexikanon: A HyFI-based library for Tokenizers},
  month        = aug,
  year         = 2023,
  publisher    ={Zenodo},
  version      ={v0.6.2},
  doi          ={10.5281/zenodo.8248117},
  url          ={https://doi.org/10.5281/zenodo.8248117}}@software{lee_2023_hyfi,
  author       ={Young Joon Lee},
  title        ={Lexikanon: A HyFI-based library for Tokenizers},
  year         = 2023,
  publisher    ={GitHub},
  url          ={https://github.com/entelecheia/lexikanon}}ChangelogSee theCHANGELOGfor more information.ContributingContributions are welcome! Please see thecontributing guidelinesfor more information.LicenseThis project is released under theMIT License.
Package: leximited
PY-LEXIMITEDby LCF NERD 218LEX-ENCODING IN PYTHONLexicographically DelimitedEncoding for python, why not ay...See:https://github.com/elenasa/ULAM/wiki/Appendix-D:-Leximited-FormatFollowing on from:https://github.com/walpolea/leximitedjsWHY? :https://twitter.com/walpolea/status/1260954256292458497LIKE THIS? CHECK OUT =>https://www.livingcomputation.org/INSTALLhttps://pypi.org/project/leximited/1.1.1/pip install leximitedIMPORTimport leximitedUSECallleximited.to_leximited()with numbers (int or str) or arbitrary strings to get their leximited version.Callleximited.from_leximited()with lex-encoded numbers (int or str) or arbitrary lex-encoded strings to get their "normal" version.Also supports lists and tuples and allows for mixed lists with lex-encoding on numbers only, see examples below.print(f'INTEGERS: {leximited.to_leximited(1)}')
INTEGERS: 11print(f"NUMBERS WITH LEADING 0s: {leximited.to_leximited('002')}")
NUMBERS WITH LEADING 0s: '12'print(f'BIG NUMBERS: {leximited.to_leximited(2000000000)}')
BIG NUMBERS: 92102000000000print(f"SHORT STRINGS: {leximited.to_leximited('Bh3!!!')}")
SHORT STRINGS: 6Bh3!!!print(f'LONG STRINGS: {leximited.to_leximited("a man, a plan, a guy: eleets")}')
LONG STRINGS: 9228a man, a plan, a guy: eleetsprint(f"EMPTY STRINGS: {leximited.to_leximited('')}")
EMPTY STRINGS: 0Also takes lists or tuples, and optionally preserve non-number strings as their original form (convert_text defaults to True to lex-encode everything).in_list = [1, '002', 2000000000, 'Bh3!!!', 'a man, a plan, a guy: eleets', '']
print(f'INPUT: {in_list}')
leximited_list = leximited.list_to_leximited(in_list, convert_text=True)
print(f'LEXIMITED: {leximited_list}')
back_again = leximited.list_from_leximited(leximited_list)
print(f'AND BACK AGAIN: {back_again}')

INPUT: [1, '002', 2000000000, 'Bh3!!!', 'a man, a plan, a guy: eleets', '']
LEXIMITED: [11, '12', 92102000000000, '6Bh3!!!', '9228a man, a plan, a guy: eleets', '0']
AND BACK AGAIN: [1, '2', 2000000000, 'Bh3!!!', 'a man, a plan, a guy: eleets', '']Note that the leading zeros are lost when converting back again.
Package: leximpact-prepare-data
Préparation des données pour LexImpactCe projet regroupe les scripts permettant de préparer les données des
différents projetsLeximpact.Schéma complet de préparation et d’utilisation des donnéesLe pipeline prepare-data est donc le suivant :Input: erfs_flat_2018.h501_db_reduce.ipynbObjectif: Réduit le nombre de variables dans la baseOutput: 01_erfs_reduced_2018.h502_db_enlarge.ipynbObjectif: Ajoute des gens fictifs dans la base pour pouvoir calibrerOutput: 02_erfs_enlarged_2018.h503_db_add_rfr.ipynbInput : CalibPote-2018-revkire.jsonObjectifs: - Calculer le RFR dans OpenFisca - Calibrer le RFR ERFS_2018
sur POTE_2018Output: 03_erfs_rfr_2018.h504_db_add_var0403_db_add_var_copules.ipynb0401_db_add_var_copules-algo_monte-carlo.ipynb0402_db_add_var_copules-validate.ipynbInput : ExportCopule-2018-variable.jsonObjectif: Ajoute les variables issues de POTE 2018 dans la base ERFS
2018Output: 04_erfs_var_copules_2018.h505_db_calib_var_copules.ipynbInput : CalibPote-2019-variable.jsonObjectifs: - Vieillit la base ERFS_2018 vers 2019 (nos données les plus
récentes) : inflation économique et inflation des foyers - Calibre
chacune des variables issues de POTE sur POTE 2019Output: 05_erfs_calibrated_ff_2018_to_2019.h506_db_aging_final.ipynbObjectifs:Vieillit la base ERFS_2019 vers 2021 (année voulue pour les calculs) :
inflation économique et inflation des foyersBruitage statistique de la base pour anonymisationOutput: 06_erfs_ff_2018_aged_2021.h5How to contributePlease see thecontributing
page.
Package: leximpact-socio-fisca-simu-etat
French State Budget Simulation APIHTTP API for OpenFiscaUsed byLexImpact, a simulator of the French tax-benefit system.Make use ofOpenFiscaa rules as code tax benefit system.Installpip install leximpact_socio_fisca_simu_etatHow to useFill me in please! Don't forget code examples:fromleximpact_socio_fisca_simu_etat.csg_simuimport(ReformeSocioFiscale,compute_all_simulation,)reform=ReformeSocioFiscale(base=2021,amendement={"prelevements_sociaux.contributions_sociales.csg.activite.imposable.taux":0.068,},output_variables=["csg"],quantile_nb=4,quantile_compare_variables=["csg"],)resultat=compute_all_simulation(reform,annee_de_calcul="2021")[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:41] reform.amendement : None
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:41] No cache for 5078a86c7201f132a44472774283e4a774e85b9bd94c88c9e756d3cb2021, compute it.
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] OpenFisca a retourné des individus
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] reform.amendement : {'prelevements_sociaux.contributions_sociales.csg.activite.imposable.taux': 0.068}
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:45] No cache for 3580f21542881d1996a7b3a16a759d8318e58bdc44ac26ab6cfbf8662021, compute it.
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:49] OpenFisca a retourné des individus
[leximpact_socio-fisca-simu-etat DEBUG @ 20:10:49] Temps de traitement total pour la simulation 7.873102587996982 secondesprint(f"Montant total de la csg :{resultat.result['amendement'].state_budget['csg']:,}€")Montant total de la csg : -147,054,542,277.62744 €How to developPlease see contributing.
Package: leximpact-survey-scenario
leximpact-survey-scenario🇬🇧 This repository is created for internal use atLexImpact. Nevertheless, if you are interested in this source code, please do not hesitate to contact us! It defines aLeximpactErfsSurveyScenarioclass that allows computations of the effect of the French legislation on a population.The legislation model isOpenFisca-France. The population is built from a revision (FPR) of anINSEE survey called ERFS.🇲🇫 Ce dépôt est créé à des fins d'usage interne de l'équipeLexImpact. Néanmoins, si vous êtes intéressé par ce code source, n'hésitez pas à nous contacter ! Il définit une classeLeximpactErfsSurveyScenariopermettant les calculs des effets de la législation Française sur une population.Le modèle de la législation estOpenFisca-France. La population est construite à partir d'une version (FPR, Fichiers de Production et Recherche) d'uneenquête INSEE nommée ERFS.Installerleximpact-survey-scenarioPré-requisCe dépôt requiert le langagePython.Installer en mode développementLa gestion des dépendances et du paquetage est effectuée avecPoetry.Installer le code source et ses dépendancesRécupérer le code source de l'application avec la commande suivante :gitclonegit@git.leximpact.dev:leximpact/leximpact-survey-scenario.gitPuis installer l'application dans un environnement virtuel avec :cdleximpact-survey-scenario
makeinstallConfigurerSi vous utilisez déjàopenfisca-survey-manageret/ouopenfisca-france-datavous disposez probablement déjà d'une configuration des fichiers de données (collections de fichiers de population) dans votre répertoire$HOME/.config/openfisca-survey-manager. Par défaut,leximpact-survey-scenariohérite du comportement d'openfisca-survey-manageret utilisera cette configuration.En l'absence d'une configuration dans$HOME/.config/openfisca-survey-manager, la configuration de ce dépôt sera utilisée :./.config/openfisca-survey-manager/config.ini.TesterAprès avoir installé et configuré le dépôt, les tests deleximpact-survey-scenariopeuvent être exécutés en local avec la commande suivante :maketestPublierLa dépendance à une branche de France-reforms empêche de publier cette partie du code source sur PyPI. Néanmoins, nous publions le packageleximpact-survey-scenariosur PyPI dans la CI en supprimant automatiquement cette dépendance à la volée.
Package: lexio
lexIOlexIO is a Natural Language Processing (NLP) library in python that is built on top of the numpy library.lexIO allows you to do some basic NLP tasks like guessing the topic of an essay, finding the most used words in an essay, removing the stopwords and many more to come in the future.Installing lexIOUsing pippip install lexioorpip3 install lexioUsing condaconda install lexioUsing lexIOImport lexIOimport lexioCreate a 'language_processor' objectprocessor = lexio.language_processor()Load the text either your own or from lexio.datasetsYour texttext = "lexIO is a Natural Language Processing (NLP) library in python"now you can get the topic byprocessor.get_topic(text)
output: lexionote: The output is automatically lowercased by the processorThe 'get_topic' function automatically tokenizes the text, but it you want to do it manually, you can:text = 'lexIO is a Natural Language Processing (NLP) library in python

#tokenizing
tokenized = processor.tokenize(text)

#guessing the topic
processor.get_topic(tokenized, tokenized=True)
output: lexioYou can get the most repeated words in the text after removing all the stopwordsStopwords are all the unnecessary words that dont have their own meaning like is, am, are, hello, they, you etcprocessor.highlights(text, highlights=5)
output: {'python': 1, 'library': 1, 'nlp': 1, 'processing': 1, 'language': 1}This will return the Top-5 most repeated wordsImporting pre-built text datasetsapple = lexio.datasets.load_apple
google = lexio.datasets.load_googlefor more datasets, use:print(dir(lexio.datasets.availables))
output: ['load_apple', 'load_earth', 'load_nepal', 'load_AI', 'load_discipline', 'load_essay_AI', 'load_nature', 'load_google']
Package: lexipy
LexiPyLexiPy is a Python package that provides a simple lexer implementation. It allows you to tokenize a string by breaking it down into individual tokens. LexiPy also supports the usage of special terms, which can be treated as one token during tokenization, this can be usefull in domain specific cases like programming languages.InstallationYou can install LexiPy using pip:pipinstalllexipyUsageLexer Class (iterator)TheLexerclass returns an iterator over the tokensfromlexipyimportLexercontent="Hello, World!"lexer=Lexer(content,special_terms=None)# Iteratortokens=list(lexer)# list of tokens list[str]tokens>>>['hello',',','world','!']content(str): The string to be tokenized.special_terms(set[str] | None, optional): A set of special terms to be treated as one token. Default isNone.Returns an iterator over the tokenslexify FunctionThelexifyfunction provides a more convenient way to tokenize a string.fromlexipyimportlexifycontent="Hello, World!"tokens=lexify(content,special_terms=None)tokens>>>['hello',',','world','!']content(str): The string to be tokenized.special_terms(set[str] | None, optional): A set of special terms to be treated as one token. Default isNone.Returns a list of tokens.Special termsYou can specify a set of special terms that should be treated as one token during the tokenization process. This can be useful when tokenizing programming languages or other cases where certain terms should not be split.fromlexipyimportLexercontent="Hello, World!"special_terms={"world!"}lexer=Lexer(content,special_terms=special_terms)tokens=list(lexer)tokens>>>['hello',',','world!']Note: The special terms are case insensitivePlaned featuresAdding an optional word stemmer (default: nltk), also support for custom stemmers through an interfaceContributingContributions to LexiPy are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on theGitHub repository.LicenseLexiPy is licensed under theMIT License.ReferencesGithub RepositoryPyPI package
Package: lexit
LexitLexit is an open source lexer generator written in Python3.6 using new features likeNamedTuple, type hinting and__init_subclass__hook.JSON lexer examplefromlexitimportLexerclassJsonLexer(Lexer):NUMBER=r'-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?'STRING=r'"(\\\"|\\\\|[^"\n])*?"i?'L_BRACE=r'{'R_BRACE=r'}'L_BRACKET=r'\['R_BRACKET=r'\]'TRUE=r'true'FALSE=r'false'NULL=r'null'COMMA=r','COLON=r':'ignore=r'\s+'tokens=list(JsonLexer.lex('{"hello": "world"}'))RequirementsThe only requirement is Python3.6+For testing thepytestlibrary is usedInstallationpipinstalllexitError handlingtry:
    tokens = list(JsonLexer.lex('${"hello": "world"}'))
except LexerError as e:
    print(e.pretty())
    exit(1)

# Will produce the following output:

No match for character '$' in line 1 column 1
${"hello": "world"}
^Design decisionsShould be easy to useLongest match priority (++always wins over+despite of the order in which the tokens are defined in the lexer class)Self-describing errors for humans (it's should be obvious what happened and when)
Package: lexlib
Python library for some utilities that may be useful for word research.NoteThis project is a work in progress. New functions may be added at
any point. SeeCHANGELOG.mdfor important changes.FeaturesExtract consonant clusters from a word or list of words.Find neighbors of words.Other neighbor utilities, e.g., type of neighbor relationship, position of
divergence.Get the syllable count for words or a list of words, or filter lists of words
by number of syllables.Get the consonant-vowel structure of a word.RequirementsPython 3InstallationUsing pip installpip3 install lexlibFrom sourcegit clonefor the development versiongit clone https://github.com/cranndarach/lexlib.git
cd lexlib
pip installDownload a releaseDownload the latest releaseIn a terminal (remember to update the path):cd path/to/download/lexlib-x.y.z.tar.gz
tar -xvf lexlib-x.y.z.tar.gz
cd lexlib-x.y.z/
pip installUsageTo import the package to use in your projectimport lexlib as lxNoteAll of the submodules are imported by lexlib. That means that you can call,
for example,lx.get_neighbor_pairs()instead oflx.neighbors.get_neighbor_pairs().For documentation on specific functions, see thedocs/directory or theonline documentationor enterhelp(lx.function_name)into your interpreter.LicenseThis package is licensed under the terms of the MIT license, copyright (c)
2016-2019 R. Steiner.
Package: lexmachina-client
python-lexmachina-api-clientPython Client for Lex Machina Litigation Analytics APIThis package provides a client to access the Lex Machina API for legal analytics. Access and documentation are provided at theLex Machina API Developer Portal.Getting StartedCreate a new venv with the commandpython3 -m venv /path/to/new/virtual/environmentRunpython3 -m pip install --upgrade pip setuptools wheelInstall package withpip3 install lexmachina-client.Create an app and get the client key and secret via thedirections here.In your project directory create a directoryconfigand inside that create a file named config.ini . Populate using the below values and the key and secret from above. The below values for URLS should be used if you are using Lex Machina's production API.[URLS]
token_url = /oauth2/token
base_url = https://api.lexmachina.com

[CREDENTIALS]
client_id = "CLIENT_ID"
client_secret ="CLIENT_SECRET"To execute API calls you will use the LexMachinaClient of this package. This is discussed in detail later.For each of these, you first create the object then call the functions on that object.Lex Machina ClientThe LexMachinaClient object is the main way to interact with the Lex Machina API.Instantiating the LexMachinaClient objectIf called with no parameter in the constructor, the config file will be loaded from theconfigdirectory created earlier.fromlexmachinaimportLexMachinaClientclient=LexMachinaClient()If passed a string for a file path, the config file will be loaded from that location.client=LexMachinaClient("../config/config.ini")GET functions from LexMachinaClientThe functions provided fall into several classes:Lists of resourcesLookup by IDSearchesLists of ResourcesThese functions are available from LexMachinaClient. Each returns a JSON object describing resources.LexMachinaClient.list_case_resolutions()LexMachinaClient.list_case_tags()LexMachinaClient.list_case_types()LexMachinaClient.list_courts()LexMachinaClient.list_damages()LexMachinaClient.list_events()LexMachinaClient.list_judgment_sources()Lookup by ID(s)These functions are available from LexMachinaClient. Each takes a single integer or an array of up to 100 integers where the parameter is the Lex Machina ID for that record. It will return a JSON object or an array of objects representing the data for that type of record.LexMachinaClient.get_attorneys()LexMachinaClient.get_district_cases()LexMachinaClient.get_federal_judges()LexMachinaClient.get_law_firms()LexMachinaClient.get_magistrates()LexMachinaClient.get_parties()LexMachinaClient.get_patents()