Google Cloud Natural Language情感分析教程

这篇具有很好参考价值的文章主要介绍了Google Cloud Natural Language情感分析教程。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

安装 Google Cloud SDK

支持的 Python 版本 Python 3(3.5 到 3.9)。

运行 PowerShell 命令:

(New-Object Net.WebClient).DownloadFile("https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe", "$env:Temp\GoogleCloudSDKInstaller.exe")& $env:Temp\GoogleCloudSDKInstaller.exe

安装时,取消选择”Bundled Python”选项

打开Google Cloud SDK Shell

(按照以下步骤输入) port和address改为自己实际代理情况

Welcome to the Google Cloud SDK! Run "gcloud -h" to get the list of available commands.

---

D:\Programming\Tools\cloud\google_cloud\cloud_sdk>gcloud config set proxy/type socks5

Updated property [proxy/type].

D:\Programming\Tools\cloud\google_cloud\cloud_sdk>gcloud config set proxy/address 127.0.0.1

Updated property [proxy/address].

D:\Programming\Tools\cloud\google_cloud\cloud_sdk>gcloud config set proxy/port 1080

Updated property [proxy/port].

D:\Programming\Tools\cloud\google_cloud\cloud_sdk>gcloud init

Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [proxyconfig0] are:

core:

  disable_usage_reporting: 'False'

proxy:

  address: 127.0.0.1

  port: '1080'

  type: socks5

Pick configuration to use:

 [1] Re-initialize this configuration [proxyconfig0] with new settings

 [2] Create a new configuration

 [3] Switch to and re-initialize existing configuration: [default]

Please enter your numeric choice:  1

Your current configuration has been set to: [proxyconfig0]

You can skip diagnostics next time by using the following flag:

  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.

Checking network connection...done.

Reachability Check passed.

Network diagnostic passed (1/1 checks passed).

You must log in to continue. Would you like to log in (Y/n)?  y

Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline

You are logged in as: [dreammax1997@gmail.com].

Pick cloud project to use:

 [1] tonal-run-227315

 [2] Create a new project

Please enter numeric choice or text value (must exactly match list

item):  1

Your current project has been set to: [tonal-run-227315].

Do you want to configure a default Compute Region and Zone? (Y/n)?  y

Which Google Compute Engine zone would you like to use as project

default?

If you do not specify a zone via a command line flag while working

with Compute Engine resources, the default is assumed.

 [1] us-east1-b

 [2] us-east1-c

 [3] us-east1-d

 [4] us-east4-c

Too many options [56]. Enter "list" at prompt to print choices fully.

Please enter numeric choice or text value (must exactly match list

item):  1 (根据实际情况选)

Your project default Compute Engine zone has been set to [us-east1-b].

You can change it by running [gcloud config set compute/zone NAME].

Your project default Compute Engine region has been set to [us-east1].

You can change it by running [gcloud config set compute/region NAME].

Created a default .boto configuration file at [C:\Users\DreamMax\.boto]. See this file and

[https://cloud.google.com/storage/docs/gsutil/commands/config] for more

information about configuring Google Cloud Storage.

Your Google Cloud SDK is configured and ready to use!

* Commands that require authentication will use dreammax1997@gmail.com by default

* Commands will reference project `tonal-run-227315` by default

* Compute Engine commands will use region `us-east1` by default

* Compute Engine commands will use zone `us-east1-b` by default

要谷歌账号绑定信用卡,免费试用12个月,300$赠金。

详细见:Google Cloud_google cloud 永久免费_dufufd的博客-CSDN博客

设置应用默认凭据本地开发环境

在Google Cloud SDK shell里运行

创建凭据文件:gcloud auth application-default login

创建服务帐号密钥并将其提供给 ADC

对于 PowerShell:

$env:GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH"

将 KEY_PATH 替换为包含您的服务帐号密钥的 JSON 文件的路径。

例如:$env:GOOGLE_APPLICATION_CREDENTIALS="C:\Users\username\Downloads\service-account-file.json"

来源:https://cloud.google.com/docs/authentication/provide-credentials-adc?hl=zh-cn#local-dev

配置完应用默认凭据后可以使用情感分析,详细举例流程见:https://cloud.google.com/natural-language/docs/sentiment-tutorial?hl=zh-cn文章来源地址https://www.toymoban.com/news/detail-466626.html

到了这里,关于Google Cloud Natural Language情感分析教程的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Natural Language Processing自然语言处理(NLP)

       欢迎来到此处,这里是我边学*边 整理 的有关机械学*/深度学*的相关笔记。先前我对这方面的知识不是很了解,笔记整理必然有不妥之处,请见谅并斧正。 目录: 1.Word Vectors(词向量) 2.Neural Classifiers(神经分类器) 3.神经网络和反向传播 4.Dependency Parsing 5.语言模型(LM)和循环神经

    2024年02月08日
    浏览(33)
  • 自然语言处理(Natural Language Processing,NLP)解密

    专栏集锦,大佬们可以收藏以备不时之需: Spring Cloud 专栏: Python 专栏: Redis 专栏: TensorFlow 专栏: Logback 专栏: 量子计算: 量子计算 | 解密著名量子算法Shor算法和Grover算法 AI机器学习实战: AI机器学习实战 | 使用 Python 和 scikit-learn 库进行情感分析 AI机器学习 | 基于lib

    2024年01月21日
    浏览(38)
  • EE6405-Natural Language Processing Week 1(LEC)

    NLP represents a facet of artificial intelligence focussed on examining, comprehending, andproducing human languages as they are naturally spoken and written. NLP代表了人工智能的一个方面,专注于检查、理解和生成人类自然说话和书写的语言。 NOISE REDUCTION Remove special characters,punctuation, and irrelevantinformation to cl

    2024年03月26日
    浏览(51)
  • Introduction to Natural Language Processing with NLTK

    作者:禅与计算机程序设计艺术 : Natural language processing (NLP) is a subfield of computer science that focuses on the interaction between machines and human languages. It involves building computational models that can understand and manipulate textual data in various ways. The aim of this article is to provide an overview of natural languag

    2024年02月08日
    浏览(36)
  • 自然语言处理技术(Natural Language Processing)知识点

    对自然语言处理相关的知识点进行总结。 自然语言处理(NLP)是一种人工智能技术,用于处理和理解自然语言文本。NLP 的目标是使计算机能够像人类一样理解、处理或生成自然语言,以便能够完成各种任务,例如文本分类、情感分析、机器翻译、问答系统等。 NLP 的实现通常

    2024年04月25日
    浏览(39)
  • Leveraging Natural Language Processing to Generate Pers

    作者:禅与计算机程序设计艺术 现代医疗卫生领域面临着巨大的需求量,而给患者提供正确、专业的治疗建议成为了现实存在的难题。如何根据患者自身情况,通过对病人的病情描述进行分析,及时为其提供准确且有效的治疗建议,是一个至关重要的问题。为了实现这一目标

    2024年02月09日
    浏览(34)
  • Essential Steps in Natural Language Processing (NLP)

    💗💗💗欢迎来到我的博客,你将找到有关如何使用技术解决问题的文章,也会找到某个技术的学习路线。无论你是何种职业,我都希望我的博客对你有所帮助。最后不要忘记订阅我的博客以获取最新文章,也欢迎在文章下方留下你的评论和反馈。我期待着与你分享知识、互

    2024年02月08日
    浏览(40)
  • Using Natural Language Processing for Sentiment Analysi

    作者:禅与计算机程序设计艺术 Sentiment analysis is a widely studied and practical technique to extract subjective information from text data such as reviews, social media posts, online comments etc. It has many applications including customer feedback analysis, brand reputation management, product recommendation systems, marketing efforts, and

    2024年02月08日
    浏览(31)
  • 表情识别-情感分析-人脸识别(代码+教程)

    面部情绪识别(FER)是指根据面部表情识别和分类人类情绪的过程。通过分析面部特征和模式,机器可以对一个人的情绪状态作出有根据的推断。这个面部识别的子领域高度跨学科,涉及计算机视觉、机器学习和心理学等领域的知识。 以下是一些关键领域,其中这项技术可能

    2024年02月09日
    浏览(29)
  • 深度学习6:自然语言处理-Natural language processing | NLP

    目录 NLP 为什么重要? 什么是自然语言处理 – NLP NLP 的2大核心任务 自然语言理解 – NLU|NLI 自然语言生成 – NLG NLP(自然语言处理) 的5个难点 NLP 的4个典型应用 NLP 的 2 种途径、3 个核心步骤 总结 自然语言处理 “语言理解是人工智能领域皇冠上的明珠” 比尔·盖茨 在人工智能

    2024年02月11日
    浏览(41)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包