Tim M 57b5cefde5 Updated all `.md` files to contain newest image 2 年之前
..
Avengers-Similarity-Analysis 59bdc2c6f9 Add README 6 年之前
README.md 57b5cefde5 Updated all `.md` files to contain newest image 2 年之前
embedText.py 7d1dd06f21 Add universal sentence encoder code 6 年之前

README.md

Universal Sentence Encoder

This repository contains code for Universal Sentence Encoder blog post.

download

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.