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
Google Cloud Natural Language情感分析教程相关推荐
- Google发布用于Google Cloud的.Net API
Google近期宣布针对Google Cloud API的.Net支持.这包括C#绑定和PowerShell cmdlet.还有一个Visual Studio扩展,它允许在Google Compute ...
- 大数据早报:谷歌Cloud Natural Languages API推新技术 全球三分之二的人口通过移动设备上网(9.21)
数据早知道,上36dsj看早报! 来源36大数据,作者:奥兰多 『谷歌』谷歌Cloud Natural Languages API推新技术:助力新闻行业发展 近日,谷歌在其免费的 Cloud Natu ...
- 情感分析:几乎包括你需要知道的所有(一)
1.情感分析教程: 有一份几乎为所有人准备的情感分析教程,包括程序员,非程序员,营销人员,数据分析师,代理人,销售人员等等. 在本节中,我们将分享各种各样的教程,以便您可以找到适合自己的情绪分析. 1 ...
- 使用Google Cloud Platform分散您的应用程序
by Simeon Kostadinov 通过Simeon Kostadinov 使用Google Cloud Platform分散您的应用程序 (Decentralize your applicat ...
- 【组队学习】【29期】3. 自然语言处理之情感分析
3. 自然语言处理之情感分析 航路开辟者:芙蕖.戴治旭.陈海顺 领航员:初晓宇 航海士:芙蕖.戴治旭.陈海顺.汪超 基本信息 开源内容:https://github.com/datawhalechin ...
- 人工智能 - paddlepaddle飞桨 - 深度学习基础教程 - 情感分析
情感分析 本教程源代码目录在book/understand_sentiment,初次使用请您参考Book文档使用说明. 背景介绍¶ 在自然语言处理中,情感分析一般是指判断一段文本所表达的情绪状态.其中 ...
- 细粒度情感分析(Aspect Based Sentiment Analysis, ABSA),一个从零开始的案例教程【Python实现】
目录 前言 数据和源码 你要了解的基础 1. 细粒度情感分析(ABSA)案例背景 1.1 任务介绍 1.2 数据基本介绍 1.3 如何评估ABSA的结果 2. 任务一:Aspect Term Extr ...
- SnowNLP简易教程:分词、词性标注、情感分析、繁体转换、关键字抽取、相似度计算...
SnowNLP 一个可以方便的处理中文文本内容的python写的类库,受到了TextBlob的启发而写的 安装:pip install snownlp from snownlp import Sn ...
- AI实战!开源一个机器学习/情感分析实战项目(附源码/教程)|湾区人工智能...
分享一个在公司做的机器学习文本分类项目的demo,该分类项目是一个通用的文本分类项目,这里的数据集我酒店用户评价数据,分类模型为二分类,正面评价和负面评价,这里所说的通用,就是你可以根据你自己的数据, ...
最新文章
- python判断文件夹是否存在
- 占用过高_Windows10电脑磁盘占用率过高,用这二招轻松解决
- spring 两次进入拦截器_过滤器和拦截器的 6 个区别,别再傻傻分不清了
- JAVA 可视化日历
- vs2008 64位 如何连接64位oracle,vs2008中如何连接服务器上Oracle实例?
- myeclipse 内存不够用报错PermGen space 和 An internal error has occurred.
- 基于SEIRD和元胞自动机(CA)模型的传染病发展趋势预测
- JMeter下载安装以及使用教程
- 编程语言选型之技法融合,与领域融合的那些套路
- bzoj 4199: [Noi2015]品酒大会 (后缀自动机+DP)
- 题解 CF722E 【Research Rover】
- Dream(励志英文演讲)
- c语言fixed的用法,Fixed函数
- c++求一个数的因子
- 洛谷-P1425-小鱼的游泳时间
- 小时候玩的10款经典街机游戏,如今我们都在玩什么?
- IntelliJ IDEA重置配置设定
- 小米 Redmi G Pro 游戏本锐龙版 评测
- GPS基础知识(五)、GPS导航电文
- max232c语言,串行口通信(STC89C52+MAX232):串行口通信硬件设计详解
热门文章
- 目前流行的服务器管理软件是什么
- 使用JLink下载 RT1052 (i.MX RT系列芯片)
- c语言怎么移动小数点和数字位置_iphone手机打字怎么移动光标位置?15个苹果手机实用小技巧...
- 粒子系统与流动效果——HW7
- HarmonyOS Data Ability关系数据库
- python判断100以内质数:一种非主流写法
- C语言零基础入门——1.基础知识与环境搭建。
- 金蝶云星空-临时表清理及计划任务配置检查
- vue+nuxtjs中使用swiper( vue-awesome-swiper)缩略图(双向控制)
- 小米ES65 2022款评测 怎么样