1 Star 5 Fork 1

cubone/learnopencv

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Universal Sentence Encoder

This repository contains the scripts for Universal Sentence Encoder. For more details, refer to the post.

Instructions

First install the dependencies.

pip3 install --quiet "tensorflow>=1.7"
pip3 install --quiet tensorflow-hub
pip3 install --quiet seaborn

To run the message encoder example, use: python3 embedMessages.py

To run the Semantic Similarity Analysis on Avengers:Infinity Warcast, use: cd Avengers-Similarity-Analysis

python3 process-script.py This will process the raw script and remove all the text contained in brackets.

Next, we have to extract the dialogues of the characters.

python3 get-character-lines.py

Finally, use the Universal Sentence Encoder for running Semantic Similarity Analysis.

python3 universal-sentence-encoder.py

This will display and save the Similarity Matrix as Avenger-semantic-similarity.png.

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cubone/learnopencv.git
git@gitee.com:cubone/learnopencv.git
cubone
learnopencv
learnopencv
master

搜索帮助