Skip to content

lauritswl/SemanticProjection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SemanticProjection

Installation

You can install SemanticProjecter via [pip] from the [git]:

pip install git+"https://github.com/lauritswl/SemanticProjection"

Usage

See the following code snippet for an example of how to project and standardize text snippets with the SemanticProjector Class:

from semanticprojection.SemanticProjecter import SemanticProjector
# Define text as list:
list_of_texts = ["This is negative.", "This is positive.", "This is neutral", "I hate you!", "I like this so much!", "They didn't care for it"]
# Create an projector object from SemanticProjector class.
projector = SemanticProjector()
# Project the text, by using the Sentiment Vector:
projector.project_texts(
    texts=list_of_texts,
    concept_vector="Sentiment"
)
# Add a standardized collumn - adds interpretability in larger datasets
projector.standardize()

# Show results (stored in class atribute- self.results)
print(projector.results)

Vector Lookup

Title Description
"Sentiment" Encodes the sentiment of a sentence (negative → positive).
WIP Working on adding more of the shelf vectors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages