nlpapiv2

cloudmersive-nlp-api-client的Python项目详细描述


cloudmersive_nlp_api_客户端

强大的自然语言处理API(v2)允许您执行词性标记、实体识别、句子分析等,以帮助您理解非结构化文本的含义。在

这个Python包为Cloudmersive NLP提供了一个本机API客户机

  • API版本:v1
  • 包版本:4.0.1
  • 生成包:io.swagger.codegen.语言.PythonClientCodegen在

要求

Python 2.7和3.4+

安装和使用

pip安装

如果python包托管在Github上,则可以直接从Github安装

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(您可能需要使用根权限运行pipsudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

然后导入包:

^{pr2}$

设置工具

通过Setuptools安装。在

python setup.py install --user

(或sudo python setup.py install为所有用户安装软件包)

然后导入包:

importcloudmersive_nlp_api_client

入门

请按照installation procedure操作,然后运行以下命令:

from__future__importprint_functionimporttimeimportcloudmersive_nlp_api_clientfromcloudmersive_nlp_api_client.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: Apikeyconfiguration=cloudmersive_nlp_api_client.Configuration()configuration.api_key['Apikey']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance=cloudmersive_nlp_api_client.AnalyticsApi(cloudmersive_nlp_api_client.ApiClient(configuration))input=cloudmersive_nlp_api_client.HateSpeechAnalysisRequest()# HateSpeechAnalysisRequest | Input hate speech analysis requesttry:# Perform Hate Speech Analysis and Detection on Textapi_response=api_instance.analytics_hate_speech(input)pprint(api_response)exceptApiExceptionase:print("Exception when calling AnalyticsApi->analytics_hate_speech: %s\n"%e)

API终结点文档

所有uri都是相对于https://api.cloudmersive.com

ClassMethodHTTP requestDescription
AnalyticsApianalytics_hate_speechPOST /nlp-v2/analytics/hate-speechPerform Hate Speech Analysis and Detection on Text
AnalyticsApianalytics_profanityPOST /nlp-v2/analytics/profanityPerform Profanity and Obscene Language Analysis and Detection on Text
AnalyticsApianalytics_sentimentPOST /nlp-v2/analytics/sentimentPerform Sentiment Analysis and Classification on Text
AnalyticsApianalytics_similarityPOST /nlp-v2/analytics/similarityPerform Semantic Similarity Comparison of Two Strings
AnalyticsApianalytics_subjectivityPOST /nlp-v2/analytics/subjectivityPerform Subjectivity and Objectivity Analysis on Text
ExtractEntitiesApiextract_entities_postPOST /nlp-v2/extract-entitiesExtract entities from string
LanguageDetectionApilanguage_detection_get_languagePOST /nlp-v2/language/detectDetect language of text
LanguageTranslationApilanguage_translation_translate_deu_to_engPOST /nlp-v2/translate/language/deu/to/engTranslate German to English text with Deep Learning AI
LanguageTranslationApilanguage_translation_translate_eng_to_deuPOST /nlp-v2/translate/language/eng/to/deuTranslate English to German text with Deep Learning AI
LanguageTranslationApilanguage_translation_translate_eng_to_fraPOST /nlp-v2/translate/language/eng/to/fraTranslate English to French text with Deep Learning AI
LanguageTranslationApilanguage_translation_translate_eng_to_rusPOST /nlp-v2/translate/language/eng/to/rusTranslate English to Russian text with Deep Learning AI
LanguageTranslationApilanguage_translation_translate_fra_to_engPOST /nlp-v2/translate/language/fra/to/engTranslate French to English text with Deep Learning AI
LanguageTranslationApilanguage_translation_translate_rus_to_engPOST /nlp-v2/translate/language/rus/to/engTranslate Russian to English text with Deep Learning AI
ParseApiparse_parse_stringPOST /nlp-v2/parse/treeParse string to syntax tree
PosTaggerApipos_tagger_tag_adjectivesPOST /nlp-v2/pos/tag/adjectivesPart-of-speech tag a string, filter to adjectives
PosTaggerApipos_tagger_tag_adverbsPOST /nlp-v2/pos/tag/adverbsPart-of-speech tag a string, filter to adverbs
PosTaggerApipos_tagger_tag_nounsPOST /nlp-v2/pos/tag/nounsPart-of-speech tag a string, filter to nouns
PosTaggerApipos_tagger_tag_pronounsPOST /nlp-v2/pos/tag/pronounsPart-of-speech tag a string, filter to pronouns
PosTaggerApipos_tagger_tag_sentencePOST /nlp-v2/pos/tag/sentencePart-of-speech tag a string
PosTaggerApipos_tagger_tag_verbsPOST /nlp-v2/pos/tag/verbsPart-of-speech tag a string, filter to verbs
RephraseApirephrase_english_rephrase_sentence_by_sentencePOST /nlp-v2/rephrase/rephrase/eng/by-sentenceRephrase, paraphrase English text sentence-by-sentence using Deep Learning AI
SegmentationApisegmentation_get_sentencesPOST /nlp-v2/segmentation/sentencesExtract sentences from string
SegmentationApisegmentation_get_wordsPOST /nlp-v2/segmentation/wordsGet words in input string
SpellcheckApispellcheck_check_sentencePOST /nlp-v2/spellcheck/check/sentenceCheck if sentence is spelled correctly
SpellcheckApispellcheck_correct_jsonPOST /nlp-v2/spellcheck/check/wordFind spelling corrections

模型文档

授权文件

阿皮基

  • ^{str>$key}1类型
  • API key参数名:Apikey
  • Location:HTTP头

作者

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何通过编程将图像插入Word文档?   java Maven在Quickstart原型中更改jUnit版本   OS X上的eclipse java版本和路径   java在hibernate中将具有依赖对象的类映射到单独的表   JavaJSF2如何在复合组件子组件完成操作后执行操作?   java无法从列表<节点>强制转换为列表<元素>   java如何将数组链接到方法   检查数组中是否存在一个范围内的所有值的最佳方法是什么?(爪哇)   redis Java:我们应该尽快退出trywithresource块来释放资源吗?   对象不会出现在java swing中的按键上   SQLServerJava。sql。SQLException:客户端尝试签出连接已超时   java如何使用JPA以线程安全的方式保存或更新对象?   java如何在不显示滚动条的情况下消除SWT ScrolledComposite中浪费的空间   如何在Eclipse中从Java编辑器显示scala文档?