当前位置:网站首页>22.6.7 successfully use doc2vec model to generate embedded vectors
22.6.7 successfully use doc2vec model to generate embedded vectors
2022-06-10 14:09:00 【dream_ uping】
1. Changed a place to solve the problem of not being able to use

2. Code
from gensim.test.utils import get_tmpfile
from gensim.models.doc2vec import Doc2Vec,TaggedDocument
from gensim.models import Doc2Vec
# import sys # Import sys modular
# sys.setrecursionlimit(3000) # Change the default recursion depth to 3000
# fname = get_tmpfile('F:\\test\my_test\doc2vec Generate vector file \\all_model_titles')
# model = Doc2Vec.load(fname)
model = Doc2Vec.load('F:\\test\my_test\doc2vec Generate vector file \\all_model_titles')
vector = model.infer_vector(["hello world!","responce"])
print(vector)result :

It depends on gensim by 3.8.3.

边栏推荐
- 2022山东省安全员C证复训题库及在线模拟考试
- Why should the R & D effectiveness team of Internet companies be independent? When is independence?
- 还在说大学排名是笑话?最新规定:世界top50大学可以直接落户上海!
- net core天马行空系列-可用于依赖注入的,数据库表和c#实体类互相转换的接口实现
- About native SQL and database methods in PHP framework
- Resolve the error reported when installing gerapy: error: cannot uninstall 'certificate' It is a distutils installed project...
- 在启牛开户安全么
- UE5如何將屏幕坐標轉為世界坐標和世界方向
- Kotlin 冒泡算法 ,高德地图 过滤掉两点之间距离小于50的数据,不重复显示
- Primary master-slave table integration process development process
猜你喜欢

Use of 5.8G microwave radar module, working principle and introduction of 5.8G microwave radar module

2022 examination question bank and online simulation examination for main principals of hazardous chemical business units

一次主从表集成流程开发过程
![[C language] pointer function, function pointer and array function](/img/3c/e8816c4fe52c1757f4f9e17d19c285.png)
[C language] pointer function, function pointer and array function

Design tools and skills for beginners to build their own blog

IIC总线的主要特点/通信过程/读写过程
![[Discrete Mathematical period Review Series] Second and first order Logic (precate Logic)](/img/f3/c7e61462a012ca1b88dca7b1ecdb25.png)
[Discrete Mathematical period Review Series] Second and first order Logic (precate Logic)

北京/上海内推 | 微软亚洲研究院系统与网络组招聘全职实习生

【笔记】C语言数组指针、结构体+二维数组指针小记

【FAQ】運動健康服務REST API接口使用過程中常見問題和解决方法總結
随机推荐
【笔记】关于keil中的出现的编译映射内存不足的问题
Flutter Listview, Column, Row学习个人总结2
Leetcode 829. Sum of continuous integers
lua 表操作
5.8G微波雷达模块使用,5.8G微波雷达模块工作原理和介绍
jdbc对数据库增删改查
Operation of simulated examination platform for theoretical question bank of refrigeration and air conditioning equipment operation in 2022
Microsoft Word tutorial, how to change margins and create a newsletter column in word?
Mutual transformation among lists, arrays and tensors
大厂必备的40个方法论
For the first time, the Pentagon admitted to funding 46 biological facilities in Ukraine. Russia once revealed that only three were safe
[discrete mathematics review series] IV. figure
基于FPGA的VGA协议实现
Kotlin bubbling algorithm, Gaud map filters out the data whose distance between two points is less than 50, and does not repeat the display
P3379 [template] nearest common ancestor (LCA)
Why should the R & D effectiveness team of Internet companies be independent? When is independence?
Ue5 Comment convertir les coordonnées de l'écran en coordonnées du monde et en direction du monde
组装芯片难保竞争优势,痛定思痛的高通终于开始自研核心架构
【C语言】指针函数与函数指针、数组函数
Markdown sets the font to red