1 Star 5 Fork 1

cubone/learnopencv

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
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

Search