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如何在XML文件中自动检测XSD模式文件?   java Netbeans禁用水平滚动   java提取数字列并排序   java从对象返回嵌套集合的正确方法是什么?   java从源代码获取项目,无需配置构建路径   如何使用JavaAPI获得AKKA for MySQL的持久性?   java如何打印2d数组时间表?   spring restful webservice中的java返回JsonObject   java在当前“while(iterator.hasNext())”循环中添加到迭代器   无法在同一包的不同类中访问具有默认access关键字的java变量   用字符串Java搜索数据   JPA存储库中的java双向关联不工作   java Junit使用者编译错误   java可以同时生成多个RDD   java如何使用WebDriver接受/解除未处理的警报?