教程 | 使用大模型将文本数据转化为结构化数据

实验数据为外卖评论, 今天咱们做个有难度的文本分析任务,从不同维度(味道、速度、服务)对外卖评论进行打分(-1.0~1.0)文本分析(也称为文本挖掘或自然语言处理,NLP)是指使用计算机算法和技术从大量文本数据中提取有价值信息的过程。文本分析的目标是从非结构化的文本数据中识别模式、提取关键信息、理解语义,并将其转化为结构化数据以便进一步分析和应用。...

2025-02-14 · 4 min · 大邓

PNAS | GPT 是多语言心理文本分析的有效工具

许多领域(包括心理学、社会学、通信、政治学和计算机科学)都使用计算方法来分析文本数据。但是,现有的文本分析方法存在许多缺点。字典方法虽然易于使用,但与最近的方法相比通常不是很准确。机器学习模型虽然更准确,但可能难以训练和使用。我们证明,大型语言模型 GPT 能够使用简单的提示准确检测 12 种语言文本中的各种心理结构(由手动注释者判断),无需额外的训练数据。因此,GPT 克服了现有方法中存在的局限性。GPT 在几种较少使用的语言中也很有效,这可以促进来自研究不足的环境中的文本分析研究。...

2025-02-17 · 1 min · 大邓

实验 | 使用本地大模型预测在线评论情感类别和分值

情感分析是分析文本以确定消息的情绪基调是积极、消极还是中性的过程。通过情感分析,我们可以了解文本是否表现出快乐、悲伤、愤怒等情绪。主要的计算方法有语义词典法、机器学习法、混合方法、其他方法。 随着chatGPT这类大语言模型的出现, 它们增强了文本理解能力,使我们能够更精准的把握文本中的语义和情绪,也因此大型语言模型 (LLM) 一出场就有实现情感分析功能。Sentiment analysis is the process of analyzing text to determine whether the emotional tone of a message is positive, negative, or neutral. Through sentiment analysis, we can understand whether the text expresses emotions such as happiness, sadness, anger, etc. The main computational methods are semantic dictionary method, machine learning method, hybrid method, and other methods. With the emergence of large language models such as chatGPT, they enhance text understanding capabilities, allowing us to more accurately grasp the semantics and emotions in the text. Therefore, large language models (LLMs) have implemented sentiment analysis functions as soon as they appeared....

2025-02-07 · 4 min · 大邓

实验 | 如何使 Ollama 结构化输出 JSON 样式的结果

开源 LLMS 越来越受欢迎,Ollama 的 OpenAI 兼容性后来发布了,这使得使用 JSON 模式获取结构化输出成为可能。在本篇博文的结尾,您将了解如何有效地利用 Instructor 和 ollama。但在继续之前,让我们先探讨一下修补的概念。Open-source LLMS are gaining popularity, and the release of Ollama's OpenAI compatibility later it has made it possible to obtain structured outputs using JSON schema.By the end of this blog post, you will learn how to effectively utilize instructor with ollama. But before we proceed, let's first explore the concept of patching....

2025-02-07 · 2 min · 大邓

教程 | 如何使用 Ollama 下载 & 使用本地大语言模型

Ollama是一款开源应用程序,可让您使用 MacOS、Linux 和 Windows 上的命令行界面在本地运行、创建和共享大型语言模型。Ollama 可以直接从其库中访问各种 LLM,只需一个命令即可下载。下载后,只需执行一个命令即可开始使用。这对于工作量围绕终端窗口的用户非常有帮助。如果他们被困在某个地方,他们可以在不切换到另一个浏览器窗口的情况下获得答案。Ollama is an open source application that allows you to run, create, and share large language models locally using a command line interface on MacOS, Linux, and Windows. Ollama can access a variety of LLMs directly from its library and can be downloaded with just one command. Once downloaded, it only takes one command to get started. This is very helpful for users whose workload revolves around a terminal window. If they are stuck somewhere, they can get the answer without switching to another browser window....

2025-02-07 · 4 min · 大邓