[python] 基于wordcloud库绘制词云图

news2024/9/20 20:37:04

词云Wordcloud是文本数据的一种可视化表示方式。它通过设置不同的字体大小或颜色来表现每个术语的重要性。词云在社交媒体中被广泛使用,因为它能够让读者快速感知最突出的术语。然而,词云的输出结果没有统一的标准,也缺乏逻辑性。对于词频相差较大的词汇有较好的区分度,但对于颜色相近、频次相近的词汇来说效果并不好。因此词云不适合应用于科学绘图。本文基于python库wordcloud来绘制词云。wordcloud安装方式如下:

pip install wordcloud

文章目录

  • 0 wordcloud绘图说明
  • 1 绘图实例
    • 1.1 单个单词绘制词云
    • 1.2 基础绘制
    • 1.3 自定义词云形状
    • 1.4 使用词频字典绘图
    • 1.5 颜色更改
    • 1.6 为特定词设置颜色
    • 1.7 绘制中文词云
  • 2 参考

0 wordcloud绘图说明

wordcloud库关于绘制词云的相关函数均由其内置类WordCloud提供。

WordCloud类初始函数如下:

WordCloud(font_path=None, width=400, height=200, margin=2,
          ranks_only=None, prefer_horizontal=.9, mask=None, scale=1,
          color_func=None, max_words=200, min_font_size=4,
          stopwords=None, random_state=None, background_color='black',
          max_font_size=None, font_step=1, mode="RGB",
          relative_scaling='auto', regexp=None, collocations=True,
          colormap=None, normalize_plurals=True, contour_width=0,
          contour_color='black', repeat=False,
          include_numbers=False, min_word_length=0, collocation_threshold=30)

初始函数参数介绍如下:

参数类型说明
font_pathstr字体路径,中文词云绘制必须要提供字体路径
widthint输出画布宽度
heightint输出画布高度
marginint输出画布每个词汇边框边距
prefer_horizontalfloat词汇水平方向排版出现的频率
masknumpy-array为空使用默认mask绘制词云,非空用给定mask绘制词云且宽高值将被忽略
scalefloat按照比例放大画布长宽
color_funcfunc颜色设置函数
max_wordsint最大统计词数
min_font_sizeint最小字体尺寸
stopwordslist绘图要过滤的词
random_stateint随机数,主要用于设置颜色
background_colorstr背景颜色
max_font_sizeint最大字体尺寸
font_stepint字体步长
modestrpillow image的绘图模式
relative_scalingfloat词频和字体大小的关联性
regexpstr使用正则表达式分隔输入的文本
collocationsbool是否包括两个词的搭配
colormapstr给每个单词随机分配颜色,若指定color_func,则忽略该方法
normalize_pluralsbool英文单词是否用单数替换复数
contour_widthint词云轮廓尺寸
contour_colorstr词云轮廓颜色
repeatbool是否重复输入文本直到允许的最大词数
include_numbersbool是否包含数字作为短语
min_word_lengthint单词包含最少字母数

WordCloud类提供的主要函数接口如下:

  • generate_from_frequencies(frequencies):根据词频生成词云
  • fit_words(frequencies):等同generate_from_frequencies函数
  • process_text(text):分词
  • generate_from_text(text):根据文本生成词云
  • generate(text):等同generate_from_text
  • to_image:输出绘图结果为pillow image
  • recolor:重置颜色
  • to_array:输出绘图结果为numpy array
  • to_file(filename):保存为文件
  • to_svg:保存为svg文件

1 绘图实例

1.1 单个单词绘制词云

import numpy as np
import matplotlib.pyplot as plt
from wordcloud import WordCloud

text = "hello"

# 返回两个数组,只不过数组维度分别为n*1 和 1* m
x, y = np.ogrid[:300, :300]

# 设置绘图区域
mask = (x - 150) ** 2 + (y - 150) ** 2 > 130 ** 2
mask = 255 * mask.astype(int)

# 绘制词云,repeat表示重复输入文本直到允许的最大词数max_words,scale设置放大比例
wc = WordCloud(background_color="white", repeat=True,max_words=32, mask=mask,scale=1.5)
wc.generate(text)

plt.axis("off")
plt.imshow(wc, interpolation="bilinear")
plt.show()

# 输出到文件
_ = wc.to_file("result.jpg")

png

1.2 基础绘制


from wordcloud import WordCloud

# 文本地址
text_path = 'test.txt'
# 示例文本
scr_text = '''The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!'''

# 保存示例文本
with open(text_path,'w',encoding='utf-8') as f:
    f.write(scr_text)

# 读取文本
with open(text_path,'r',encoding='utf-8') as f:
    # 这里text是一个字符串
    text = f.read()
# 生成词云, WordCloud对输入的文本text进行切词展示。
wordcloud = WordCloud().generate(text)

import matplotlib.pyplot as plt
plt.axis("off")
plt.imshow(wordcloud, interpolation='bilinear')
plt.show()

png

# 修改显示的最大的字体大小
wordcloud = WordCloud(max_font_size=50).generate(text)

# 另外一种展示结果方式
image = wordcloud.to_image()
image.show()

png

1.3 自定义词云形状

from PIL import Image
import numpy as np
import matplotlib.pyplot as plt

from wordcloud import WordCloud, STOPWORDS

# 文本地址
text_path = 'test.txt'
# 示例文本
scr_text = '''The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!'''

# 保存示例文本
with open(text_path,'w',encoding='utf-8') as f:
    f.write(scr_text)

# 读取文本
with open(text_path,'r',encoding='utf-8') as f:
    # 这里text是一个字符串
    text = f.read()

# 想生成带特定形状的词云,首先得准备具备该形状的mask图片
# 在mask图片中除了目标形状外,其他地方都是空白的
mask = np.array(Image.open("mask.png"))

# 要跳过的词
stopwords = set(STOPWORDS)
# 去除better
stopwords.add("better")

# contour_width绘制mask边框宽度,contour_color设置mask区域颜色
# 如果mask边框绘制不准,设置contour_width=0表示不绘制边框
wc = WordCloud(background_color="white", max_words=2000, mask=mask,
               stopwords=stopwords, contour_width=2, contour_color='red',scale=2,repeat=True)

# 生成图片
wc.generate(text)

# 存储文件
wc.to_file("result.png")

# 展示词云结果
plt.imshow(wc, interpolation='bilinear')
plt.axis("off")
plt.figure()
# 展示mask图片
plt.imshow(mask, cmap=plt.cm.gray, interpolation='bilinear')
plt.axis("off")
plt.show()

png

png

1.4 使用词频字典绘图

# pip install multidict安装
import multidict as multidict

import numpy as np

import re
from PIL import Image
from wordcloud import WordCloud
import matplotlib.pyplot as plt

# 统计词频
def getFrequencyDictForText(sentence):
    fullTermsDict = multidict.MultiDict()
    tmpDict = {}

    # 按照空格分词
    for text in sentence.split(" "):
        # 如果匹配到相关词,就跳过,这样做可以获得定制度更高的结果
        if re.match("a|the|an|the|to|in|for|of|or|by|with|is|on|that|be", text):
            continue
        val = tmpDict.get(text, 0)
        tmpDict[text.lower()] = val + 1
    # 生成词频字典
    for key in tmpDict:
        fullTermsDict.add(key, tmpDict[key])
    return fullTermsDict


def makeImage(text):
    mask = np.array(Image.open("mask.png"))

    wc = WordCloud(background_color="white", max_words=1000, mask=mask, repeat=True)
    wc.generate_from_frequencies(text)

    plt.imshow(wc, interpolation="bilinear")
    plt.axis("off")
    plt.show()



# 文本地址
text_path = 'test.txt'
# 示例文本
scr_text = '''The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!'''

# 保存示例文本
with open(text_path,'w',encoding='utf-8') as f:
    f.write(scr_text)

# 读取文本
with open(text_path,'r',encoding='utf-8') as f:
    # 这里text是一个字符串
    text = f.read()

# 获得词频字典
fullTermsDict = getFrequencyDictForText(text)
# 绘图
makeImage(fullTermsDict)

png

1.5 颜色更改

from PIL import Image
import numpy as np
import matplotlib.pyplot as plt

from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator

# 文本地址
text_path = 'test.txt'
# 示例文本
scr_text = '''The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!'''

# 保存示例文本
with open(text_path,'w',encoding='utf-8') as f:
    f.write(scr_text)

# 读取文本
with open(text_path,'r',encoding='utf-8') as f:
    # 这里text是一个字符串
    text = f.read()

# 图片地址https://github.com/amueller/word_cloud/blob/master/examples/alice_color.png
alice_coloring = np.array(Image.open("alice_color.png"))
stopwords = set(STOPWORDS)
stopwords.add("better")

wc = WordCloud(background_color="white", max_words=500, mask=alice_coloring,
               stopwords=stopwords, max_font_size=50, random_state=42,repeat=True)
# 生成词云结果
wc.generate(text)
# 绘制
image = wc.to_image()
image.show()


# 绘制类似alice_coloring颜色的词云图片
# 从图片中提取颜色
image_colors = ImageColorGenerator(alice_coloring)
# 重新设置词云颜色
wc.recolor(color_func=image_colors)
# 绘制
image = wc.to_image()
image.show()

# 展示mask图片
plt.imshow(alice_coloring, cmap=plt.cm.gray, interpolation='bilinear')
plt.axis("off")
plt.show()

png

png

png

1.6 为特定词设置颜色

from wordcloud import (WordCloud, get_single_color_func)
import matplotlib.pyplot as plt


# 直接赋色函数
class SimpleGroupedColorFunc(object):
    def __init__(self, color_to_words, default_color):
        # 特定词颜色
        self.word_to_color = {word: color
                              for (color, words) in color_to_words.items()
                              for word in words}
        # 默认词颜色
        self.default_color = default_color

    def __call__(self, word, **kwargs):
        return self.word_to_color.get(word, self.default_color)


class GroupedColorFunc(object):

    def __init__(self, color_to_words, default_color):
        self.color_func_to_words = [
            (get_single_color_func(color), set(words))
            for (color, words) in color_to_words.items()]

        self.default_color_func = get_single_color_func(default_color)

    def get_color_func(self, word):
        """Returns a single_color_func associated with the word"""
        try:
            color_func = next(
                color_func for (color_func, words) in self.color_func_to_words
                if word in words)
        except StopIteration:
            color_func = self.default_color_func

        return color_func

    def __call__(self, word, **kwargs):
        return self.get_color_func(word)(word, **kwargs)


text = """The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!"""

# 直接输入文本时,在统计数据时是否包括两个词的搭配
wc = WordCloud(collocations=False).generate(text.lower())

# 为特定词设置颜色
color_to_words = {
    'green': ['beautiful', 'explicit', 'simple', 'sparse',
                'readability', 'rules', 'practicality',
                'explicitly', 'one', 'now', 'easy', 'obvious', 'better'],
    '#FF00FF': ['ugly', 'implicit', 'complex', 'complicated', 'nested',
            'dense', 'special', 'errors', 'silently', 'ambiguity',
            'guess', 'hard']
}

# 设置除特定词外其他词的颜色为grey
default_color = 'grey'

# 直接赋色函数,直接按照color_to_words设置的RGB颜色绘图,输出的颜色不够精细
# grouped_color_simple = SimpleGroupedColorFunc(color_to_words, default_color)

# 更精细的赋色函数,将color_to_words设置的RGB颜色转到hsv空间,然后进行绘图
grouped_color = GroupedColorFunc(color_to_words, default_color)

# 应用颜色函数
wc.recolor(color_func=grouped_color)

# 绘图
plt.figure()
plt.imshow(wc, interpolation="bilinear")
plt.axis("off")
plt.show()

png

1.7 绘制中文词云

import jieba
import matplotlib.pyplot as plt
from wordcloud import WordCloud, ImageColorGenerator
import numpy as np
# 读取文本
# 下载地址https://github.com/amueller/word_cloud/blob/master/examples/wc_cn/CalltoArms.txt
with open('CalltoArms.txt','r',encoding='utf-8') as f:
    text = f.read()

# 中文必须设置字体文件
# 下载地址https://github.com/amueller/word_cloud/blob/master/examples/fonts/SourceHanSerif/SourceHanSerifK-Light.otf
font_path =  'SourceHanSerifK-Light.otf'

# 不用于绘制词云的词汇列表
# 下载地址https://github.com/amueller/word_cloud/blob/master/examples/wc_cn/stopwords_cn_en.txt
stopwords_path = 'stopwords_cn_en.txt'
# 词云
# 模板图片
back_coloring = np.array(Image.open("alice_color.png"))

# 向jieba分词词典添加新的词语
userdict_list = ['阿Q', '孔乙己', '单四嫂子']


# 分词
def jieba_processing_txt(text):
    for word in userdict_list:
        jieba.add_word(word)

    mywordlist = []
    # 分词
    seg_list = jieba.cut(text, cut_all=False)
    liststr = "/ ".join(seg_list)

    with open(stopwords_path, encoding='utf-8') as f_stop:
        f_stop_text = f_stop.read()
        f_stop_seg_list = f_stop_text.splitlines()

    for myword in liststr.split('/'):
        if not (myword.strip() in f_stop_seg_list) and len(myword.strip()) > 1:
            mywordlist.append(myword)
    return ' '.join(mywordlist)
# 文字处理
text = jieba_processing_txt(text)

# margin设置词云每个词汇边框边距
wc = WordCloud(font_path=font_path, background_color="black", max_words=2000, mask=back_coloring,
               max_font_size=100, random_state=42, width=1000, height=860, margin=5,
               contour_width=2,contour_color='blue')


wc.generate(text)

# 获得颜色
image_colors_byImg = ImageColorGenerator(back_coloring)

plt.imshow(wc.recolor(color_func=image_colors_byImg), interpolation="bilinear")
plt.axis("off")
plt.figure()
plt.imshow(back_coloring, interpolation="bilinear")
plt.axis("off")
plt.show()

png

png

2 参考

  • wordcloud
  • Wordcloud各参数含义

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/68403.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Log,SqlServerProfile, EFProfile三种监视EntityFramework中的sql流

大家在学习entityframework的时候,都知道那linq写的叫一个爽,再也不用区分不同RDMS的sql版本差异了,但是呢,高效率带来了差灵活性,我们 无法控制sql的生成策略,所以必须不要让自己缺乏好的工具去监控sql,本篇给大家介绍的三种监控手段Log和SqlServer profile,ef profi…

QA | SWCF2022 笔记:卫星传输链路中的关键技术分享

2022年度SWCF卫星通信与仿真测试研讨会正在进行中。精彩演讲:卫星传输链路中的关键技术分享,收到一些粉丝的技术问题,我们汇总了热点问题并请讲师详细解答。 主题:卫星传输链路中的关键技术分享 认识卫星通信与传输链路过程 1. …

来看看火爆全网的ChatGPT机器人写的武侠小说,我直呼内行!

作为一个程序员,不免对最近爆火的ChatGPT聊天机器人非常好奇,晚上睡不着觉,经过一番折腾,总算和ChatGPT聊上了。然后突发奇想,让它写武侠小说如何,会让小说家失业吗?结果机器人的反应让我直呼内…

RfDNet 在Ubuntu16下的配置与运行——(二)数据准备与训练

RfDNet 在Ubuntu16下的配置与运行——(二)数据准备与训练 相关博客:RfDNet 在Ubuntu16下的配置与运行——(一)运行Demo 接上篇,现在需要下载数据,官方使用的训练数据为: ScanNet 数据集 Scan2CAD 数据集:Scan2CAD ali…

Linux(常用命令)

(1)目录操作 ls 列出当前目录下都有啥ls / 或者 跟个具体的路径可以查看指定目录的内容ls -l 缩写为 ll 可以以列表的形式展示目录内容pwd 查看当前路径对应的绝对路径 cd / 切换到根目…

Redis缓存篇:高频问题横扫核心知识点,面试高级工程师必备知识体系

文章目录Redis 为什么这么快?到底有多快?基于内存实现高效的数据结构SDS 简单动态字符串优势zipList 压缩列表quicklistskipList 跳跃表整数数组(intset)单线程模型I/O 多路复用模型Redis 全局 hash 字典Hash 冲突怎么办&#xff…

vue 如何获取路由详细内容信息

目录前言:路由(router)的信息:获取路由的所有信息获取路由中每个信息的单个值获取路由中需要显示的值总结:前言: vue 中路由(router)的功能就是:把 url 与 应用中的对应…

【视觉高级篇】23 # 如何模拟光照让3D场景更逼真?(上)

说明 【跟月影学可视化】学习笔记。 光照效果简介 物体的光照效果是由光源、介质(物体的材质)和反射类型决定的,而反射类型又由物体的材质特点决定。 在 3D 光照模型中,根据不同的光源特点分为四种: 环境光&#…

事务相关知识集锦

作者:李玉亮 引言 数据库事务与大多数后端软件开发人员的工作密不可分,本文从事务理论、事务技术、事务实践等方面对常用的相关事务知识进行整理总结,供大家参考。  事务理论介绍 事务定义 在数据库管理系统中&…

Navicat!OceanBase社区版新朋友来啦!

引言: 近期,Navicat Premium 16.1与Navicat for MySQL 16.1版本,将新增 OceanBase 社区版兼容功能,为用户在使用 OceanBase 社区版迁移过程中提供数据库管理开发工具新的选择,旨在帮助用户提升工作效率,减少…

「模型即服务AI」1分钟调用SOTA人脸检测,同时搭建时光相册小应用

时光相册应用效果一、物料 人脸检测:https://modelscope.cn/models/damo/cv_resnet101_face-detection_cvpr22papermogface/summary 时光相册: https://modelscope.cn/studios/damo/face_album/summary 二、背景 最近有两个计算机应用发展的方向正在潜…

社区疫情防控系统毕业设计,社情疫情防控系统设计与实现,毕业设计怎么写论文源码开题报告需求分析怎么做

项目背景和意义 目的:本课题主要目标是设计并能够实现一个基于web网页的疫情下社区健康评估系统,整个网站项目使用了B/S架构,基于java的springboot框架下开发;通过后台设置网站信息,设置广告信息,查看和管理…

2022选择了交大,回顾这一年的成长

Datawhale干货 作者:王琦,上海交通大学,Datawhale成员2022年是颇为忙碌的一年,今年我从中国科学院大学毕业、申请上了上海交通大学的博士、参与贡献了开源教程“Easy-RL”(5.6K GitHub Stars)、出版了著作《…

【面试高频题】难度 2/5,回溯算法经典运用

题目描述 这是 LeetCode 上的 93. 复原 IP 地址 ,难度为 中等。 Tag : 「回溯」、「DFS」 有效 IP 地址 正好由四个整数(每个整数位于 0 到 255 之间组成,且不能含有前导 0),整数之间用 . 分隔。 例如:&…

按指定频次对时间序列数据进行分组pd.grouper()方法

【小白从小学Python、C、Java】 【计算机等级考试500强双证书】 【Python-数据分析】 构造时间序列为索引的DataFrame 按照指定的时间间隔分组统计 df.grouper() 选择题 关于以下python代码说法错误的一项是? import pandas as pd ipd.to_datetime(["2022-12-01",…

面试官:MySQL 数据库查询慢,除了索引问题还可能是什么原因?面试架构师必备知识

文章目录数据库查询流程慢查询分析索引相关原因连接数过小buffer pool太小还有哪些骚操作?总结mysql查询为什么会慢,关于这个问题,在实际开发经常会遇到,而面试中,也是个高频题。遇到这种问题,我们一般也会…

Ubuntu20运行SegNeXt代码提取道路水体(一)——从零开始运行代码过程摸索

SegNeXt代码最近可谓是非常火 应导师的要求打工人需要学习一下新的代码 但是网上千篇一律都是论文的讲解 如何跑通代码并且使用自己的数据跑出一个好的结果却没有一个详细的教程 那么就让我自己来从零开始跑通代码吧 下载代码和数据 首先咱们先别想着用自己的数据 从githu…

iTOP3568开发板ubuntu系统修改开机联网等待时间

启动开发板使用以下命令对 networking.service 文件进行修改,如下图所示: vi /etc/systemd/system/network-online.target.wants/networking.service 修改完后保存退出,重启开发板就会看到等待时间变为 2min 了,如下图所示&…

软件安全测试-网络相关基础知识

目录 1. OSI 网络模型 2. TCP/IP协议 2.1 TCP 协议分层 2.2 TCP 协议内容 2.3 应用层活动 2.4 传输层活动 2.4.1 建立连接三次握手 2.4.2 断开连接四次握手 2.4.3. 数据打包与分解 2.5 网络层活动 2.5.1 IP寻址 2.5.2 ARP协议获取MAC地址 2.5.3 BGP外部网关协议…

Neuroscout:可推广和重复利用的fMRI研究统一平台

摘要 功能磁共振成像 (fMRI) 已经彻底改变了认知神经科学,但方法上的障碍限制了研究 结果的普遍性。Neuroscout,一个端到端分析自然功能磁共振成像数据 的平台, 旨在促进稳健和普遍化的研究推广。Neuroscout利用最先进的机器学习模型来自动注…