Saravanan666/pypi-org huggingface dataset:
Package: nlp-text-cleaner
nlp_text_cleanerAboutThis is a project developed to create a utility module for text cleaning/pre processing required in NLP projectsInstallationpip install nlp-text-cleanerUsagefrom nlp_text_cleaner import nlp_text_cleaner as cleaner
    cleaned_text = cleaner.apply_stemming("I played Cricket")There are following methods present for text cleaning.split_into_sentences: A method to split text into sentencessplit_into_words: A method to split text into wordslower_case_text: A method to convert text to lower caseremove_punctuation: A method to remove punctuations in a textremove_unicode: A method to remove unicode characters in a textremove_leading_trailing_whitespaces: A method to remove white spaces at the begining or end of textremove_duplicate_whitespaces: A method to remove  consecutive white spacesdetect_language: A method to detect language of textcorrect_grammar: A method to correct spelling mistakes in a textremove_stopwords: A method to remove stopwords from text with optional argument to pass our own custom stopwords.apply_stemming: A method to apply stemming on textapply_lammatization: A method to apply lemmatization on textremove_hashtags: A method to remove hashtags in a textremove_hyperlinks: A method to remove hyperlinks in a textclean_html_code: A method to remove html entities like ' ,& ,< etc/replace_contraction: A method to sreplace contractions like n't,'ll etcget_pos_tags: A method to get POS tags of textYou can use above methods as per requirement of a use case. However,there are some default methods that you can use:clean_single_sentence: A default method to clean single sentenceclean_paragraph_to_sentences: A default method to get cleaned sentences from a paragraphclean_paragraph: A default method to clean complete paragraphContributingPlease create a Pull request on 'develop' branch.Developer InstructionsIf you are using conda then go to location of environment.yml file and run:conda env create -f environment.ymlFor pip:pip install -r requirements.txtUnit TestingGo inside 'tests' folder on command line.Run:pytest -vvContributorsMade withcontributors-img.
Package: nlp-text-corrector
nlp-text-correctoris a python package that helps post process the raw ASR outputParsing of numbers expressed as words in English and convert them to integer values.Detection of ordinal, cardinal and decimal numbers in a stream of Englishwords and get their decimal digit representations.Detection of email/website addresses as words in English and convert them to proper email/website format.Detection of times expressed as raw text in English to proper time format.CompatibilityTested on python 3.7. Requires Python >= 3.6.LicenseThis sofware is distributed under the MIT license of which you should have received a copy (see LICENSE file in this repository).Installationnlp-text-correctordoes not depend on any other third party package.To install nlp-text-corrector in your (virtual) environment:pip install nlp-text-correctorThat’s all folks!Usage examplesParse and convertExamples:>>>fromnlp_text_correctorimportasr_post_process>>>asr_post_process.convert("Book twenty first century marvel movie for my two kids of age nine and thirteen at eight twenty two pm tonight")Book21stcenturymarvelmovieformy2kidsofage9and13at8:22pmtonight>>>asr_post_process.convert("fifty-one million five hundred seventy-eight thousand three hundred two")51578302>>>asr_post_process.convert("eighty-one")81>>>asr_post_process.convert("On May twenty-third , I bought twenty-five cows, twelve chickens and one hundred twenty five point four zero kg of potatoes.")OnMay23rd,Ibought25cows,12chickensand125.40kgofpotatoes.ContributeJoin us onhttps://github.com/iAmPlus/nlp-text-corrector
Package: nlp-text-search
Fulltext-like search using NLP conceptLibrary for fulltext search using NLP concept. Usedeeppavlovfor paraphrase identification and Vantage-Point tree (based onjvptree) for fast search.InstallationInstall and update using pip:pip install -U nlp-text-searchUsageFirst init data, createdeeppavlovsettings and
Doc2Vec for emdedding.import deeppavlov
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
from gensim.utils import simple_preprocess
from nlp_text_search import create_settings, LinearizedDist, SaveableVPTreeSearchEngine

paraphrases = [
    (('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 'СЃРёРЅСЏСЏ СЂСѓС‡РєР°'), 1),
    (('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 'Р·РµР»РµРЅР°СЏ СЂСѓС‡РєР°'), 1),
    (('РєСЂР°СЃРЅР°СЏ РјР°С€РёРЅР°', 'СЃРёРЅСЏСЏ РјР°С€РёРЅР°'), 1),
    (('РєСЂР°СЃРЅР°СЏ РјР°С€РёРЅР°', 'Р·РµР»РµРЅР°СЏ РјР°С€РёРЅР°'), 1),
    (('СЃРёРЅСЏСЏ СЂСѓС‡РєР°', 'РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°'), 1),
    (('СЃРёРЅСЏСЏ СЂСѓС‡РєР°', 'Р·РµР»РµРЅР°СЏ СЂСѓС‡РєР°'), 1),
    (('СЃРёРЅСЏСЏ РјР°С€РёРЅР°', 'РєСЂР°СЃРЅР°СЏ РјР°С€РёРЅР°'), 1),
    (('СЃРёРЅСЏСЏ РјР°С€РёРЅР°', 'Р·РµР»РµРЅР°СЏ РјР°С€РёРЅР°'), 1),
    (('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 'РєСЂР°СЃРЅР°СЏ РјР°С€РёРЅР°'), 0),
    (('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 'СЃРёРЅСЏСЏ РјР°С€РёРЅР°'), 0),
    (('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 'Р·РµР»РµРЅР°СЏ РјР°С€РёРЅР°'), 0),
    (('СЃРёРЅСЏСЏ СЂСѓС‡РєР°', 'РєСЂР°СЃРЅР°СЏ РјР°С€РёРЅР°'), 0),
    (('СЃРёРЅСЏСЏ СЂСѓС‡РєР°', 'СЃРёРЅСЏСЏ РјР°С€РёРЅР°'), 0),
    (('СЃРёРЅСЏСЏ СЂСѓС‡РєР°', 'Р·РµР»РµРЅР°СЏ РјР°С€РёРЅР°'), 0)
]
all_texts = list(set([t[0][0] for t in paraphrases] + [t[0][1] for t in paraphrases]))

settings = create_settings(paraphrases, 'test')
deeppavlov.train_model(settings)
doc2vec = Doc2Vec([TaggedDocument(simple_preprocess(t), [i]) for i, t in enumerate(all_texts)],
                  min_count=1, workers=1, negative=0, dm=0, hs=1)Then create search engine and search nearest neighborsse = DefaultSearchEngine(settings, doc2vec, LinearizedDist, points=all_texts)
print(se.search('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 4))returns[('РєСЂР°СЃРЅР°СЏ СЂСѓС‡РєР°', 0), ('Р·РµР»РµРЅР°СЏ СЂСѓС‡РєР°', 0.05778998136520386), ('СЃРёРЅСЏСЏ СЂСѓС‡РєР°', 0.06721997261047363), ('СЃРёРЅСЏСЏ РјР°С€РёРЅР°', 0.48162001371383667)]You also can save and load search enginese.save('se')
se = DefaultSearchEngine.load('se')
Package: nlp-tfidf
nlp-qa-tfidf介绍tfidf
余弦短文本求相似度packagegensim
jieba
pandas实例化参数Tfidf=Tfidf(stopwords_file="",work_dir="",work_file_prefix="")#stopwords_file 停用词文件 可不填 包里自带有#work_dir 工作目录 模型存储的路径，不填则在当前项目根目录下 建议填#work_file_prefix 文件名字前缀， 不填则训练的模型名字为 _.model 可以填时间戳，或者用户id，建议填写 不然模型会相互覆盖模型训练# QA 场景# 问题列表question_list=["test1-question","test2-question","test3-question"]# 答案列表answer_list=["test1-answer","test2-answer","test3-answer"]Tfidf=Tfidf(stopwords_file="",work_dir="",work_file_prefix="")# 训练模型并保存Tfidf.save_model(question_list=question_list,answer_list=answer_list)# 输入问题，并去计算相似度Tfidf.run(question="test question")
Package: nlp-time
📦 nlp-timeTime NLP moduleInstallationpipinstall-ihttps://mirrors.aliyun.com/pypi/simple/--extra-index-urlhttps://pypi.org/simple/nlp-timeExampleimportnlp_timefromdatetimeimportdatetime# Partial replacement according to regular expressionres=nlp_time.get_time("我是周六早上6点的飞机")# output: ('周六早上6点', ('2022-05-28 06:00:00', '2022-05-28 06:59:59'))res=nlp_time.get_time("我是周六早上6点的飞机",tend_future=False)# output: ('周六早上6点', ('2022-05-21 06:00:00', '2022-05-21 06:59:59'))res=nlp_time.get_text(datetime.strptime("2022-05-22 20:06:00","%Y-%m-%d%H:%M:%S"))# output: 昨天晚上20点06分res=nlp_time.get_text("2022-05-22 20:06:00")# output: 昨天晚上20点06分res=nlp_time.get_text("2021-05-22 20:06:00")# output: 去年5月22号晚上20点06分res=nlp_time.get_text(1653091200)# output: 前天早上8点res=nlp_time.get_text("2021-05-18 20:06:00")# output: 上周三晚上20点06分To DoBe the best version of you.More Resourcesnlp-timeon github.comOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: nlp-toolbox
nlp_toolboxnlp_toolbox is an open-source GitHub repository that provides a collection of tools for natural language processing tasks. The repository provides functions for loading text from multiple sources such as the web and ebooks. Additionally, it includes functions for summarizing text, OCR, interacting with the OpenAI GPT API, and generating word clouds.II. REFERENCES2.1. How to use this package?Install the stable version:pip install nlp_toolboxYou can install the latestnlp_toolboxversion from source with the following command:pip install git+https://github.com/thinh-vu/nlp_toolbox.git@main(*) You might need to insert a!before your command when running terminal commands on Google Colab.To start using functions, you need to import them:from nlp_toolbox import *III. DEPENDENCIESChatGPT APIChatGPT API simplifies NLP tasks by allowing you to send a request in a prompt format and receive a response without the need for dependent packages.To send a request to ChatGPT API endpoint, you will need an OpenAI API key that can be obtained fromOpenAI.spacyDownload pre-trained files using terminal.python -m spacy download en_core_web_lg
python -m spacy download en_core_web_smpytesseractQuick installation guideOn Linuxsudo apt-get update
sudo apt-get install libleptonica-dev tesseract-ocr tesseract-ocr-dev libtesseract-dev python3-pil tesseract-ocr-eng tesseract-ocr-script-latnOn Macbrew install tesseractOn WindowsDownload binary fromhttps://github.com/UB-Mannheim/tesseract/wiki.Addpytesseract.pytesseract.tesseract_cmd = 'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'to your script.Install python package using pip:pip install tesseract
pip install tesseract-ocrReference:Installation guideFor Windows: Specific the location of the pytesseract by adding this code to your python projectpytesseract.pytesseract.tesseract_cmd = r'C:\Users\mrthi\AppData\Local\Tesseract-OCR\tesseract.exe'Add pre-trained languages data:Visit github and download the data file:tessdata, eg:vie.traineddatafor VietnameseCopy the downloaded file to thetessdatafolder, EgC:\Users\YOUR-USER-NAME\AppData\Local\Tesseract-OCR\tessdataIV. 🙋‍♂️ CONTACT INFORMATIONYou can contact me at one of my social network profiles:If you find value in my open-source projects and would like to support their development, you can donate viaPaypalor Momo e-wallet (VN). Your contribution will help me maintain my blog hosting fee and continue to create high-quality content. Thank you for your support!
Package: nlptools
# nlptools*nlptools* are an Unix inspired utilities for Natural Language Processing.- [Examples](#examples)- [Basic tokenization](#basic-tokenization)- [Lemmatization and Stemming](#lemmatization-and-stemming)- [Basic features](#basic-features)- [Data fetching](#data-fetching)- [Documentation](#documentation)- [Commands](#commands)- [Cookbook](#cookbook)## Examples### Basic tokenization```bashecho "Hello world!" | proc-tkn# Result:## Hello# world# !```### Lemmatization and Stemming```bashecho "dog dogs" | bin/proc-tkn | bin/proc-lmtz# Result:## dog# dog```### Basic features```bashecho "Roses are red. Violets are blue. Sugar is sweet. And so are you." \| proc-tkn \| proc-lmtz \| feat-tfidf --type idf --sep .# Result## and 0.0 0.0 0.0 1.0# are 0.4444444444444444 0.4444444444444444 0.0 0.3333333333333333# blue 0.0 1.3333333333333333 0.0 0.0# is 0.0 0.0 1.3333333333333333 0.0# red 1.3333333333333333 0.0 0.0 0.0# roses 1.3333333333333333 0.0 0.0 0.0# so 0.0 0.0 0.0 1.0# sugar 0.0 0.0 1.3333333333333333 0.0# sweet 0.0 0.0 1.3333333333333333 0.0# violets 0.0 1.3333333333333333 0.0 0.0# you 0.0 0.0 0.0 1.0```### Data fetching```bashfetch-url https://www.gutenberg.org/files/996/old/1donq10.txt \| proc-tkn \| sort \| uniq -c# Result##   5312 ``#      1 ~#      1 <#      1 =#      1 >#      1 _#     40 -#  36793 ,#   6057 ;#    370 :#    677 !#    970 ?#      1 /#   7723 .#      1 ...#    503 '#      1 '-#   5222 ''#    209 (#    209 )#     20 [#     20 ]#    .....```## Documentation### [Commands](doc/commands.md)### [CookBook](doc/cookbook.md)
Package: nlp-tools-py-lib
nlp-tools-py-libpython simple nlp libraryinstallationpipinstallnlp-tools-py-libusage# main.pyfromnlp_tools.preprocessingimportPreprocessingfromnlp_tools.loadersimportMdLoaderfromnlp_tools.representationsimportMergedMatrixRepresentationfromnlp_tools.classifiersimportClassificationProcessor,NaiveBayseTfIdfClassifierTRAIN_PATH='demo_training.md'defbuild_classifier():loader=MdLoader(TRAIN_PATH)processor=Preprocessing(loader)repres=MergedMatrixRepresentation(processor.data)classifier=ClassificationProcessor(NaiveBayseTfIdfClassifier(),repres)classifier.train()defpredict(text:str):message=repres.process_new_data(processor.process_sentence(text))intent,score=classifier.predict(message)returnintent,scorereturnpredicttraining.mdexample :# intents## my_first_intent_name### responses-...### example-...
Package: nlptoolssna
nlptoolsPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://nlptools.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-04-15)First release on PyPI.
Package: nlptooltest
nlptoolsPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://nlptooltest.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-04-15)First release on PyPI.
Package: nlptranslatetk
NlptranslatetkDescription:translates textsCommands:Install Poetry:python3 -m pip install poetryBuild Package:python3 -m poetry buildPublish Package:python3 -m poetry publish -u  -pInstall Package Locally:python3 -m pip install nlptranslatetk==1.0.0Build And Publish Package:python3 -m poetry build;python3 -m poetry publish -u  -pBuild Package; Publish Package; Install Package:python3 -m poetry build;python3 -m poetry publish -u  -p ;python3 -m pip install nlptranslatetk==1.0.0Test Nlptranslatetk:python3 -m pytest -rpP tests/
Package: nlptriples
NLPTriplesExtract NLP (RDF) Triples from a sentenceOverviewA minimalistic library to extract triples from sentences. ImplementedpaperConverted theapicreated byTed Petrouto a simple library which can be be run directly.InstallationInstall using pippip install nlptriplesUsagefromnlptriplesimporttriples,setuprdf=triples.RDF_triple()triple=rdf.extract(sent)print(triple)ImeplemetationConstituency Parse tree is create using Berkeley Neural Parser library. (the paper uses CoreNLP)The algorithm described in thepaperis used to extract triples from parse trees.
Package: nlpturk
nlpTurk - Turkish NLP librarynlpTurk is an open source Turkish NLP library consisting of machine learning based sentence boundary detection, lemmatization and POS tagging models.Installation & UsagenlpTurk can be installed fromPyPI.pipinstallnlpturknlpTurk offers a simple API to extract sentences, lemmas and POS tags.importnlpturktext="Sosyal medya hayatımıza hızlı girdi.ama yazım kurallarına dikkat eden pek yok :)"doc=nlpturk(text)# iterate over tokensfortokenindoc:print(f"token:{token.text}, lemma:{token.lemma}, pos:{token.pos}")"""Prints:token: Sosyal, lemma: sosyal, pos: ADJtoken: medya, lemma: medya, pos: NOUN..."""# or get tokens by token idstoken=doc[5]print(f"token:{token.text}, sent_start:{token.is_sent_start}, sent_end:{token.is_sent_end}")token=doc[6]print(f"token:{token.text}, sent_start:{token.is_sent_start}, sent_end:{token.is_sent_end}")"""Prints:token: ., sent_start: False, sent_end: Truetoken: ama, sent_start: True, sent_end: False"""# iterate over sentencesfori,sentinenumerate(doc.sents):print(f"sentence #{i+1}:{sent.text}")fortokeninsent:print(f"  token:{token.text}, lemma:{token.lemma}, pos:{token.pos}")"""Prints:sentence #1: Sosyal medya hayatımıza hızlı girdi.token: Sosyal, lemma: sosyal, pos: ADJ...sentence #2: ama yazım kurallarına dikkat eden pek yok :)token: ama, lemma: ama, pos: CCONJ..."""PerformanceThe evaluation was performed on test dataset. Detailed evaluation and benchmarking results can be foundhere.accuracyprecisionrecallf1-scoreSentence Segmenter-98.0996.0597.06POS Tagger-95.7596.2696.01Lemmatizer96.87---You can perform benchmarking on your own dataset.gitclonehttps://github.com/nlpturk/nlpturk.gitcdnlpturk
pipinstall-rrequirements.txt
python-mnlpturkbenchmark--data_pathpath/to/data--output_pathpath/to/output
Package: nlpvocab
nlpvocabTokens frequency counter with save/load features.
Supports save/load with Pickle and TSV formats.Provides 2 command-line scripts for building words and characters frequency vocabularies.Usage from PythonfromnlpvocabimportVocabularytext='token1 token2 token1 token2 token3'vocab=Vocabulary()vocab.update(text.split())vocab.save('vocab.tsv',format=Vocabulary.FORMAT_TSV_WITH_HEADERS)Usage from command linenlpvocab-chars/a/b/d/edir_chars_vocab.tsv
nlpvocab-words/a/b/d/edir_words_vocab.tsv
nlpvocab-chars/a/b.txtfile_chars_vocab.tsv
nlpvocab-words/a/b.txtfile_words_vocab.tsv
Package: nlp-xiaojiang
nlp_xiaojiangAugmentText- 回译（效果比较好）
- EDA（同义词替换、插入、交换和删除）（效果还行）
- HMM-marko（质量较差）
- syntax（依存句法、句法、语法书）（简单句还可）
- seq2seq（深度学习同义句生成，效果不理想，seq2seq代码大都是 [https://github.com/qhduan/just_another_seq2seq] 的，效果不理想）ChatBot- 检索式ChatBot
    - 像ES那样直接检索(如使用fuzzywuzzy)，只能字面匹配
    - 构造句向量，检索问答库，能够检索有同义词的句子
- 生成式ChatBot（todo）
    - seq2seq
    - GANFeatureProject- bert句向量、文本相似度
    - bert/extract_keras_bert_feature.py:提取bert句向量特征
    - bert/tet_bert_keras_sim.py:测试bert句向量cosin相似度
- normalization_util指的是数据归一化
    - 0-1归一化处理
    - 均值归一化
    - sig归一化处理
- sim feature（ML）
    - distance_text_or_vec:各种计算文本、向量距离等
    - distance_vec_TS_SS：TS_SS计算词向量距离
    - cut_td_idf：将小黄鸡语料和gossip结合
    - sentence_sim_feature：计算两个文本的相似度或者距离，例如qq（问题和问题），或者qa（问题和答案）run(可以在win10下,pycharm下运行)1.创建tf-idf文件等（运行2需要先跑1）:python cut_td_idf.py2.计算两个句子间的各种相似度，先计算一个预定义的，然后可输入自定义的（先跑1）:python sentence_sim_feature.py3.chatbot_1跑起来(fuzzy检索-没)（独立）：python chatbot_fuzzy.py4.chatbot_2跑起来(句向量检索-词)（独立）：python chatbot_sentence_vec_by_word.py5.chatbot_3跑起来(句向量检索-字)（独立）：python chatbot_sentence_vec_by_char.py6.数据增强（eda)：                     python enhance_eda.py7.数据增强（marko）:                   python enhance_marko.py8.数据增强（translate_account）:       python translate_tencent_secret.py9.数据增强（translate_tools）:         python translate_translate.py10.数据增强（translate_web）:          python translate_google.py11.数据增强（augment_seq2seq）:        先跑 python extract_char_webank.py生成数据，
再跑 python train_char_anti.py
然后跑 python predict_char_anti.py12.特征计算(bert)（提取特征、计算相似度）:run extract_keras_bert_feature.py run tet_bert_keras_sim.pyData- chinese_L-12_H-768_A-12（谷歌预训练好的模型）
   github项目中只是上传部分数据，需要的前往链接: https://pan.baidu.com/s/1I3vydhmFEQ9nuPG2fDou8Q 提取码: rket
   解压后就可以啦
- chinese_vector
    github项目中只是上传部分数据，需要的前往链接: https://pan.baidu.com/s/1I3vydhmFEQ9nuPG2fDou8Q 提取码: rket
    - 截取的部分word2vec训练词向量（自己需要下载全效果才会好）
    - w2v_model_wiki_char.vec、w2v_model_wiki_word.vec都只有部分
- corpus
    github项目中只是上传部分数据，需要的前往链接: https://pan.baidu.com/s/1I3vydhmFEQ9nuPG2fDou8Q 提取码: rket
    - 小黄鸡和gossip问答预料（数据没清洗）,chicken_and_gossip.txt
    - 微众银行和支付宝文本相似度竞赛数据， sim_webank.csv
- sentence_vec_encode_char
    - 1.txt（字向量生成的前100000句向量）
- sentence_vec_encode_word
    - 1.txt（词向量生成的前100000句向量）
- tf_idf（chicken_and_gossip.txt生成的tf-idf）requestments.txt- python_Levenshtei
    - 调用Levenshtein，我的python是3.6，
    - 打开其源文件: https://www.lfd.uci.edu/~gohlke/pythonlibs/
    - 查找python_Levenshtein-0.12.0-cp36-cp36m-win_amd64.whl下载即可
- pyemd
    - pyemd-0.5.1-cp36-cp36m-win_amd64.whl
- pyhanlp
    - 下好依赖JPype1-0.6.3-cp36-cp36m-win_amd64.whl参考/感谢eda_chinese：https://github.com/zhanlaoban/eda_nlp_for_Chinese主谓宾提取器：https://github.com/hankcs/MainPartExtractorHMM生成句子：https://github.com/takeToDreamLand/SentenceGenerate_byMarkov同义词等：https://github.com/fighting41love/funNLP/tree/master/data/小牛翻译：http://www.niutrans.com/index.html其他资料NLP数据增强汇总:https://github.com/quincyliang/nlp-data-augmentation知乎NLP数据增强话题:https://www.zhihu.com/question/305256736/answer/550873100chatbot_seq2seq_seqGan（比较好用）：https://github.com/qhduan/just_another_seq2seq自己动手做聊天机器人教程:https://github.com/warmheartli/ChatBotCourse
Package: nlrest
nlrestDescriptionnlrestis a Python Command Line Interface (CLI) tool that allows users to convert natural language descriptions into REST API queries and execute them. It uses OpenAI's GPT-3.5 Turbo model to interpret natural language and generate the details of the REST API call, including the method, URL, headers, and request body.InstallationPrerequisitesPython 3.6 or higherAn OpenAI API keyInstall from PyPIYou can installnlrestdirectly from PyPI:pipinstallnlrestSet Up Environment VariableBefore usingnlrest, set theOPENAI_API_KEYenvironment variable with your OpenAI API key:exportOPENAI_API_KEY='your-api-key-here'UsageBasic UsageTo usenlrest, run the command followed by the-poption and your natural language prompt:nlrest-p"Your natural language instruction here"Example:nlrest-p"Fetch the latest news from NewsAPI"The tool will output the response from the executed REST API call.Example Prompts"Fetch the latest stock prices from the Finance API.""Post a new message to my social media account saying 'Hello World!'."FeaturesConverts natural language to REST API query details.Supports various HTTP methods (GET, POST, PUT, DELETE).Executes the REST API requests and displays the response.ContributingContributions tonlrestare welcome! Please feel free to submit pull requests or open issues to improve the tool or add new features.LicenseThis project is licensed under the MIT License - see the LICENSE file for details.
Package: nlsam
Non Local Spatial and Angular Matching (NLSAM) denoisingThe reference implementation for the Non Local Spatial and Angular Matching (NLSAM) denoising algorithm for diffusion MRI.Quick linksSource downloads + precompiled binariesExample + Usage guideYou can find the latest documentation and installation instructions overherewith a downloadable version of the documentationhere.How to installIf you have a working python setup already, the next command should give you everything you need.pipinstallnlsamYou can also download the datasets used in the paper overhere.Using the NLSAM algorithmThe process is to first transform your data to Gaussian distributed signals if your dataset is
Rician or Noncentral chi distributed and then proceed to the NLSAM denoising part itself.A quickstart example call would benlsam_denoisingdwi.nii.gzdwi_nlsam.nii.gzbvalsbvecs-mmask.nii.gzFor more fine grained control and explanation of arguments,
have a look at the possible command line options with nlsam_denoising --helpYou can find a detailed usage example and assorted dataset to try out in theexamplefolder.Questions / Need help / Think this is great software?If you need help or would like more information, don't hesitate to drop me a
line at samuel.st_jean@university, where university needs to be replaced with med.lu.seReferencesThe NLSAM denoising algorithm itself is detailed inSt-Jean, S., Coupé, P., & Descoteaux, M. (2016).
"Non Local Spatial and Angular Matching : Enabling higher spatial resolution diffusion MRI datasets through adaptive denoising"
Medical Image Analysis, 32(2016), 115–130.DOIURLThe bias correction framework is a reimplementation ofKoay, CG, Özarslan, E and Basser, PJA signal transformational framework for breaking the noise floor and its applications in MRI,
Journal of Magnetic Resonance, Volume 197, Issue 2, 2009The automatic estimation of the noise distribution is computed withSt-Jean S, De Luca A, Tax C.M.W., Viergever M.A, Leemans A. (2020)
"Automated characterization of noise distributions in diffusion MRI data."
Medical Image Analysis, October 2020:101758. doi:10.1016/j.media.2020.101758And here is a premade bibtex entry.@article{St-Jean2016a,
  author = {St-Jean, Samuel and Coup{\'{e}}, Pierrick and Descoteaux, Maxime},
  doi = {10.1016/j.media.2016.02.010},
  journal = {Medical Image Analysis},
  pages = {115--130},
  title = {{Non Local Spatial and Angular Matching : Enabling higher spatial resolution diffusion MRI datasets through adaptive denoising}},
  volume = {32},
  year = {2016}
  }