I’m using this python script:
import random
import argparse
import asyncio
from typing import Tuple
import csv
import os
import nltk
from transformers import pipeline, Pipeline
from pythonosc import dispatcher, osc_server, udp_client
from pythonosc.udp_client import SimpleUDPClient
import time
nltk.data.path.append(‘C:/Users/Florence Nightingale/AppData/Roaming/nltk_data’)
new_message = 0
file_path = ‘C:/Users/Florence Nightingale/Documents/Florence Nightingale Living Portrait/InputHistory.csv’
class Config:
"""
Configuration class for default values and settings.
LOCAL_IP (str): IP address for the local machine.
TABLET_IP (str): IP address for the tablet.
LOCAL_PORT (int): Port for the local machine to listen on.
TD_PORT (int): Port for the TD (transmitting device).
TABLET_PORT (int): Port for the tablet.
OFFENSIVE_MODEL (str): Model name for offensive content classification.
CONTEXT_MODEL (str): Model name for context classification.
ZERO_SHOT_LABELS (list): List of labels for zero-shot classification.
TABLET_IP = "192.168.0.3"
OFFENSIVE_MODEL = "unitary/toxic-bert"
CONTEXT_MODEL = "facebook/bart-large-mnli"
ZERO_SHOT_LABELS = ["angel", "hero", "feminist", "rebel"]
class FlorenceAttributes:
"""A class to store and manipulate sentence classification attributes."""
LABELS = Config.ZERO_SHOT_LABELS
primary_value: int = None,
secondary_value: int = None,
tertiary_value: int = None,
quaternary_value: int = None,
ambiguous: bool = False):
Initialize the FlorenceAttributes class.
primary (str): Primary label.
secondary (str): Secondary label.
tertiary (str): Tertiary label.
quaternary (str): Quaternary label.
primary_value (int): Value of the primary label.
secondary_value (int): Value of the secondary label.
tertiary_value (int): Value of the tertiary label.
quaternary_value (int): Value of the quaternary label.
ambiguous (bool): Whether the attributes are ambiguous.
self.secondary = secondary
self.quaternary = quaternary
self.primary_value = primary_value
self.secondary_value = secondary_value
self.tertiary_value = tertiary_value
self.quaternary_value = quaternary_value
self.ambiguous = ambiguous
"""Return a string representation of the attributes."""
return (f'PRIMARY: "{self.primary}" = {self.primary_value}, '
f'SECONDARY: "{self.secondary}" = {self.secondary_value}, '
f'TERTIARY: "{self.tertiary}" = {self.tertiary_value}, '
f'QUATERNARY: "{self.quaternary}" = {self.quaternary_value}')
def has_null_labels(self) -> bool:
"""Check if any labels are null or 'None'."""
return any(label in ("", "None") for label in [self.primary, self.secondary, self.tertiary, self.quaternary])
def has_null_values(self) -> bool:
"""Check if any values are null or zero."""
return any(value in (0, None) for value in
[self.primary_value, self.secondary_value, self.tertiary_value, self.quaternary_value])
def fill_missing_labels(self):
"""Fill missing labels with available labels from the predefined list."""
used_labels = {label for label in [self.primary, self.secondary, self.tertiary, self.quaternary] if label}
free_labels = [label for label in self.LABELS if label not in used_labels]
self.primary = free_labels.pop() if len(free_labels) == 1 else random.choice(free_labels)
self.secondary = free_labels.pop() if len(free_labels) == 1 else random.choice(free_labels)
self.tertiary = free_labels.pop() if len(free_labels) == 1 else random.choice(free_labels)
self.quaternary = free_labels.pop() if len(free_labels) == 1 else random.choice(free_labels)
def reorganize_data(self) -> str:
"""Reorganize the data for display and increment the message counter."""
labels_values = zip([self.primary, self.secondary, self.tertiary, self.quaternary],
[self.primary_value, self.secondary_value, self.tertiary_value, self.quaternary_value])
result = [f"{label}: {value}" for label, value in labels_values if label in self.LABELS and value is not None]
result.append(f"/new_message {new_message}")
def generate_final_message(self, word_response: str) -> str:
"""Generate the final message including the word response and increment the message counter."""
return (f"{self.primary} = {self.primary_value}, "
f"{self.secondary} = {self.secondary_value}, "
f"{self.tertiary} = {self.tertiary_value}, "
f"{self.quaternary} = {self.quaternary_value}, "
f"newMessage = {new_message}, "
f"wordResponse = {word_response}")
def parse_args():
"""
Parse command-line arguments.
argparse.Namespace: Parsed arguments with default values.
parser = argparse.ArgumentParser(description="OSC Server for handling Unity messages")
parser.add_argument("--local_ip", default=Config.LOCAL_IP, help="The IP of the python script")
parser.add_argument("--local_port", default=Config.LOCAL_PORT, help="The port of the python script")
parser.add_argument("--td_ip", default=Config.LOCAL_IP, help="The IP of the Touch Designer app")
parser.add_argument("--td_port", type=int, default=Config.TD_PORT, help="The port of the Touch Designer app")
parser.add_argument("--unity_ip", default=Config.TABLET_IP, help="The IP of the Unity client")
parser.add_argument("--unity_port", type=int, default=Config.TABLET_PORT, help="The port of the Unity client")
return parser.parse_args()
def is_offensive(word: str, offensive_classifier: Pipeline) -> bool:
"""
Check if a word is offensive using a text classification model.
word (str): The word to check.
offensive_classifier (Pipeline): The classifier for detecting offensive content.
bool: True if the word is classified as offensive, False otherwise.
result = offensive_classifier(word)
offensive = any(res['label'] == 'toxic' and res['score'] > 0.5 for res in result)
# print(f"Checking if word '{word}' is offensive: {result}")
def is_contextually_relevant(word: str, context_classifier: Pipeline) -> bool:
"""
Check if a word is contextually relevant using a zero-shot classification model.
word (str): The word to check.
context_classifier (Pipeline): The classifier for context detection.
bool: True if the word is contextually relevant, False otherwise.
result = context_classifier(word, candidate_labels=Config.ZERO_SHOT_LABELS)
relevant = any(score > 0.3 for score in result['scores']) # Adjusted threshold for relevance
# print(f"Checking if word '{word}' is contextually relevant: {result}")
async def extract_word_response(sentence: str, offensive_classifier: Pipeline, context_classifier: Pipeline) -> str:
"""
Extract a contextually relevant and non-offensive word from a sentence.
sentence (str): The input sentence.
offensive_classifier (Pipeline): The classifier for detecting offensive content.
context_classifier (Pipeline): The classifier for context detection.
str: A relevant word if found, otherwise a blank string.
words = nltk.word_tokenize(sentence)
tagged_words = nltk.pos_tag(words)
# print(f"Tagged words: {tagged_words}")
relevant_words = [word for word, pos in tagged_words if
pos in ('JJ', 'JJR', 'JJS', 'NN', 'NNS', 'NNP', 'NNPS')
and not is_offensive(word, offensive_classifier)]
# print(f"Relevant Adjectives, Proper Nouns, and Nouns: {relevant_words}")
for word in relevant_words:
if is_contextually_relevant(word, context_classifier):
# print(f"Chosen word: {word}")
# await asyncio.sleep(0.1)
return " " # Return blank if no relevant word is found or if it's offensive
async def analyze_sentence(sentence: str) -> dict:
"""
Analyze a sentence for contextual relevance using a zero-shot classification model.
sentence (str): The input sentence.
dict: A dictionary with labels as keys and their corresponding scores as values.
classifier = pipeline("zero-shot-classification", model=Config.CONTEXT_MODEL)
result = classifier(sentence, candidate_labels=Config.ZERO_SHOT_LABELS)
weightings = {label: int(score * 100) for label, score in zip(result['labels'], result['scores'])}
# await asyncio.sleep(0.1)
async def classify_sentence(sentence: str, offensive_classifier: Pipeline, context_classifier: Pipeline)
-> Tuple[str, FlorenceAttributes, int, str]:
"""
Classify a sentence, extract relevant words, and generate a final message.
sentence (str): The input sentence to classify.
offensive_classifier (Pipeline):
context_classifier (Pipeline):
tuple: A tuple containing the final message, attributes object, message counter, and word response.
# PART 1: Analyze Sentence using one-shot classification
weightings = await analyze_sentence(sentence)
sorted_weightings = sorted(weightings.items(), key=lambda item: item[1], reverse=True)
primary, primary_value = sorted_weightings[0]
secondary, secondary_value = sorted_weightings[1]
tertiary, tertiary_value = sorted_weightings[2]
quaternary, quaternary_value = sorted_weightings[3]
attr1 = FlorenceAttributes(
primary_value=primary_value,
secondary_value=secondary_value,
tertiary_value=tertiary_value,
quaternary_value=quaternary_value,
# PART 2: Extract important words to be used as typographic elements
word_response = await extract_word_response(sentence, offensive_classifier, context_classifier)
# print(f"Weightings: {weightings}, Word response: {word_response}") # Debug statement
return str(attr1.generate_final_message(word_response)).strip(), attr1, new_message, word_response
async def handle_osc_message(unity_client: SimpleUDPClient,
td_client: SimpleUDPClient,
unused_addr,
offensive_classifier: Pipeline,
context_classifier: Pipeline,
sentence):
"""
Handle incoming OSC messages and process them.
unity_client: The UDP client to send responses to Unity (tablet).
td_client: The UDP client to send responses to Touch Designer.
unused_addr: The address of the sender.
offensive_classifier: The classifier for detecting offensive content.
context_classifier: The classifier for context detection.
*sentence: Additional arguments from the OSC message.
print("I received message from Unity")
print(f"Input message: {sentence}")
response, attribute, new_msg, word_response = await classify_sentence(sentence,
print(f"Received response from classify_sentence: {response}, {attribute}, {new_msg}, {word_response}")
save_string_to_csv(file_path, f"{sentence} , {attribute}, {word_response}")
unity_client.send_message("/response", response)
td_client.send_message(f"/{attribute.primary}", attribute.primary_value)
td_client.send_message(f"/{attribute.secondary}", attribute.secondary_value)
td_client.send_message(f"/{attribute.tertiary}", attribute.tertiary_value)
td_client.send_message(f"/{attribute.quaternary}", attribute.quaternary_value)
td_client.send_message("/newMessage", new_msg)
td_client.send_message("/wordResponse", word_response)
td_client.send_message("/message", f"Message received: '{sentence}'")
td = (end - start) * 10 ** 3
print(f"The time of execution of above program is : {td}ms")
def save_string_to_csv(file_path, string_to_save):
# Ensure the directory exists
os.makedirs(os.path.dirname(file_path), exist_ok=True)
# Open the CSV file in append mode, creating it if it doesn't exist
with open(file_path, mode='a', newline='') as file:
writer = csv.writer(file)
# Write the string as a new row
writer.writerow([string_to_save])
def main():
"""
Main function to set up and run the OSC server.
"""
unity_client = udp_client.SimpleUDPClient(args.unity_ip, args.unity_port)
td_client = udp_client.SimpleUDPClient(args.td_ip, args.td_port)
offensive_classifier = pipeline("text-classification", model=Config.OFFENSIVE_MODEL)
context_classifier = pipeline("zero-shot-classification", model=Config.CONTEXT_MODEL)
disp = dispatcher.Dispatcher()
disp.map("/florence_sentence", lambda unused_addr, *osc_args: asyncio.run(
handle_osc_message(unity_client, td_client, unused_addr,
offensive_classifier, context_classifier,
server = osc_server.ThreadingOSCUDPServer((args.local_ip, args.local_port), disp)
print(f"Serving on {server.server_address}")
if name == “main”:
main()
For some reason the ‘the time of execution of above program’ varies between 1-2seconds and approximately 13s. I need to work out why some processing times are quite quick and why others are always taking around 13s. See below printed results from multiple runs of the script:
“C:\Users\Florence Nightingale\AppData\Local\Programs\Python\Python312\python.exe” “C:\Users\Florence Nightingale\Documents\Github\florence-night\src\python\gptUnity_20072024_CW.py”
Serving on (‘192.168.0.2’, 8000)
I received message from Unity
Input message: She was great.
Received response from classify_sentence: hero = 54, angel = 21, feminist = 17, rebel = 6, newMessage = 1, wordResponse = great, PRIMARY: “hero” = 54, SECONDARY: “angel” = 21, TERTIARY: “feminist” = 17, QUATERNARY: “rebel” = 6, 1, great
The time of execution of above program is : 1682.544231414795ms
I received message from Unity
Input message: She was misunderstood.
Received response from classify_sentence: rebel = 44, feminist = 39, hero = 10, angel = 5, newMessage = 2, wordResponse = misunderstood, PRIMARY: “rebel” = 44, SECONDARY: “feminist” = 39, TERTIARY: “hero” = 10, QUATERNARY: “angel” = 5, 2, misunderstood
The time of execution of above program is : 1539.8616790771484ms
I received message from Unity
Input message: She was hated.
Received response from classify_sentence: rebel = 75, feminist = 20, hero = 3, angel = 1, newMessage = 3, wordResponse =, PRIMARY: “rebel” = 75, SECONDARY: “feminist” = 20, TERTIARY: “hero” = 3, QUATERNARY: “angel” = 1, 3,
The time of execution of above program is : 2207.784652709961ms
I received message from Unity
Input message: She was a pioneer.
Received response from classify_sentence: rebel = 54, hero = 33, feminist = 11, angel = 0, newMessage = 4, wordResponse = pioneer, PRIMARY: “rebel” = 54, SECONDARY: “hero” = 33, TERTIARY: “feminist” = 11, QUATERNARY: “angel” = 0, 4, pioneer
The time of execution of above program is : 14318.268537521362ms
I received message from Unity
Input message: Florence was inspiring.
Received response from classify_sentence: hero = 64, feminist = 14, rebel = 10, angel = 9, newMessage = 5, wordResponse = Florence, PRIMARY: “hero” = 64, SECONDARY: “feminist” = 14, TERTIARY: “rebel” = 10, QUATERNARY: “angel” = 9, 5, Florence
The time of execution of above program is : 2864.959478378296ms
I received message from Unity
Input message: She was overrated.
Received response from classify_sentence: feminist = 45, rebel = 41, hero = 8, angel = 3, newMessage = 6, wordResponse =, PRIMARY: “feminist” = 45, SECONDARY: “rebel” = 41, TERTIARY: “hero” = 8, QUATERNARY: “angel” = 3, 6,
The time of execution of above program is : 13245.206117630005ms
I received message from Unity
Input message: She was a reformer.
Received response from classify_sentence: rebel = 35, feminist = 32, hero = 29, angel = 3, newMessage = 7, wordResponse = reformer, PRIMARY: “rebel” = 35, SECONDARY: “feminist” = 32, TERTIARY: “hero” = 29, QUATERNARY: “angel” = 3, 7, reformer
The time of execution of above program is : 1694.4642066955566ms
I received message from Unity
Input message: She was controversial.
Received response from classify_sentence: rebel = 94, feminist = 3, hero = 1, angel = 0, newMessage = 8, wordResponse = controversial, PRIMARY: “rebel” = 94, SECONDARY: “feminist” = 3, TERTIARY: “hero” = 1, QUATERNARY: “angel” = 0, 8, controversial
The time of execution of above program is : 1608.0925464630127ms
I received message from Unity
Input message: She was compassionate.
Received response from classify_sentence: feminist = 35, hero = 34, angel = 26, rebel = 3, newMessage = 9, wordResponse = compassionate, PRIMARY: “feminist” = 35, SECONDARY: “hero” = 34, TERTIARY: “angel” = 26, QUATERNARY: “rebel” = 3, 9, compassionate
The time of execution of above program is : 1540.7130718231201ms
I received message from Unity
Input message: Florence was tenacious.
Received response from classify_sentence: hero = 45, rebel = 26, feminist = 23, angel = 4, newMessage = 10, wordResponse = Florence, PRIMARY: “hero” = 45, SECONDARY: “rebel” = 26, TERTIARY: “feminist” = 23, QUATERNARY: “angel” = 4, 10, Florence
The time of execution of above program is : 13600.592613220215ms
I received message from Unity
Input message: She was stubborn.
Received response from classify_sentence: rebel = 92, feminist = 5, hero = 1, angel = 0, newMessage = 11, wordResponse =, PRIMARY: “rebel” = 92, SECONDARY: “feminist” = 5, TERTIARY: “hero” = 1, QUATERNARY: “angel” = 0, 11,
The time of execution of above program is : 13258.60333442688ms
I received message from Unity
Input message: She was ahead of her time.
Received response from classify_sentence: feminist = 34, hero = 32, rebel = 26, angel = 5, newMessage = 12, wordResponse = time, PRIMARY: “feminist” = 34, SECONDARY: “hero” = 32, TERTIARY: “rebel” = 26, QUATERNARY: “angel” = 5, 12, time
The time of execution of above program is : 13615.60869216919ms
I received message from Unity
Input message: She was demanding.
Received response from classify_sentence: rebel = 51, feminist = 38, hero = 9, angel = 0, newMessage = 13, wordResponse =, PRIMARY: “rebel” = 51, SECONDARY: “feminist” = 38, TERTIARY: “hero” = 9, QUATERNARY: “angel” = 0, 13,
The time of execution of above program is : 13491.74976348877ms
I received message from Unity
Input message: She was a trailblazer.
Received response from classify_sentence: rebel = 70, hero = 23, feminist = 5, angel = 0, newMessage = 14, wordResponse = trailblazer, PRIMARY: “rebel” = 70, SECONDARY: “hero” = 23, TERTIARY: “feminist” = 5, QUATERNARY: “angel” = 0, 14, trailblazer
The time of execution of above program is : 13620.815515518188ms
I received message from Unity
Input message: Florence was innovative.
Received response from classify_sentence: rebel = 55, hero = 29, feminist = 12, angel = 2, newMessage = 15, wordResponse = Florence, PRIMARY: “rebel” = 55, SECONDARY: “hero” = 29, TERTIARY: “feminist” = 12, QUATERNARY: “angel” = 2, 15, Florence
The time of execution of above program is : 13570.091247558594ms
I received message from Unity
Input message: She was strict.
Received response from classify_sentence: feminist = 59, hero = 25, rebel = 10, angel = 5, newMessage = 16, wordResponse = strict, PRIMARY: “feminist” = 59, SECONDARY: “hero” = 25, TERTIARY: “rebel” = 10, QUATERNARY: “angel” = 5, 16, strict
The time of execution of above program is : 13559.547662734985ms
I received message from Unity
Input message: She was a visionary.
Received response from classify_sentence: hero = 54, feminist = 25, angel = 11, rebel = 8, newMessage = 17, wordResponse = visionary, PRIMARY: “hero” = 54, SECONDARY: “feminist” = 25, TERTIARY: “angel” = 11, QUATERNARY: “rebel” = 8, 17, visionary
The time of execution of above program is : 13573.865175247192ms
I received message from Unity
Input message: She was relentless.
Received response from classify_sentence: feminist = 42, rebel = 27, hero = 25, angel = 3, newMessage = 18, wordResponse = relentless, PRIMARY: “feminist” = 42, SECONDARY: “rebel” = 27, TERTIARY: “hero” = 25, QUATERNARY: “angel” = 3, 18, relentless
The time of execution of above program is : 13649.946451187134ms
I received message from Unity
Input message: She was transformative.
Received response from classify_sentence: hero = 51, feminist = 21, rebel = 21, angel = 5, newMessage = 19, wordResponse = transformative, PRIMARY: “hero” = 51, SECONDARY: “feminist” = 21, TERTIARY: “rebel” = 21, QUATERNARY: “angel” = 5, 19, transformative
The time of execution of above program is : 13568.55034828186ms
I received message from Unity
Input message: Florence was meticulous.
Received response from classify_sentence: hero = 57, feminist = 27, angel = 12, rebel = 3, newMessage = 20, wordResponse = Florence, PRIMARY: “hero” = 57, SECONDARY: “feminist” = 27, TERTIARY: “angel” = 12, QUATERNARY: “rebel” = 3, 20, Florence
The time of execution of above program is : 13617.375612258911ms
I received message from Unity
Input message: She was a perfectionist.
Received response from classify_sentence: hero = 42, feminist = 41, angel = 10, rebel = 5, newMessage = 21, wordResponse = perfectionist, PRIMARY: “hero” = 42, SECONDARY: “feminist” = 41, TERTIARY: “angel” = 10, QUATERNARY: “rebel” = 5, 21, perfectionist
The time of execution of above program is : 13548.676490783691ms
I received message from Unity
Input message: She was caring.
Received response from classify_sentence: feminist = 43, hero = 26, angel = 26, rebel = 4, newMessage = 22, wordResponse =, PRIMARY: “feminist” = 43, SECONDARY: “hero” = 26, TERTIARY: “angel” = 26, QUATERNARY: “rebel” = 4, 22,
The time of execution of above program is : 1354.7096252441406ms
I received message from Unity
Input message: She was rigid.
Received response from classify_sentence: feminist = 37, hero = 31, rebel = 21, angel = 10, newMessage = 23, wordResponse = rigid, PRIMARY: “feminist” = 37, SECONDARY: “hero” = 31, TERTIARY: “rebel” = 21, QUATERNARY: “angel” = 10, 23, rigid
The time of execution of above program is : 13553.470611572266ms
I received message from Unity
Input message: She was influential.
Received response from classify_sentence: hero = 54, feminist = 36, angel = 5, rebel = 3, newMessage = 24, wordResponse = influential, PRIMARY: “hero” = 54, SECONDARY: “feminist” = 36, TERTIARY: “angel” = 5, QUATERNARY: “rebel” = 3, 24, influential
The time of execution of above program is : 13566.997289657593ms
I received message from Unity
Input message: Florence was dedicated.
Received response from classify_sentence: feminist = 44, hero = 42, angel = 10, rebel = 1, newMessage = 25, wordResponse = Florence, PRIMARY: “feminist” = 44, SECONDARY: “hero” = 42, TERTIARY: “angel” = 10, QUATERNARY: “rebel” = 1, 25, Florence
The time of execution of above program is : 1711.2443447113037ms
I received message from Unity
Input message: She was formidable.
Received response from classify_sentence: hero = 41, feminist = 38, rebel = 12, angel = 7, newMessage = 26, wordResponse = formidable, PRIMARY: “hero” = 41, SECONDARY: “feminist” = 38, TERTIARY: “rebel” = 12, QUATERNARY: “angel” = 7, 26, formidable
The time of execution of above program is : 13557.182550430298ms
I received message from Unity
Input message: She was obsessed.
Received response from classify_sentence: rebel = 46, feminist = 26, hero = 21, angel = 4, newMessage = 27, wordResponse =, PRIMARY: “rebel” = 46, SECONDARY: “feminist” = 26, TERTIARY: “hero” = 21, QUATERNARY: “angel” = 4, 27,
The time of execution of above program is : 1316.4961338043213ms
I received message from Unity
Input message: She was kind-hearted.
Received response from classify_sentence: angel = 36, hero = 33, feminist = 27, rebel = 3, newMessage = 28, wordResponse = kind-hearted, PRIMARY: “angel” = 36, SECONDARY: “hero” = 33, TERTIARY: “feminist” = 27, QUATERNARY: “rebel” = 3, 28, kind-hearted
The time of execution of above program is : 13577.665090560913ms
I received message from Unity
Input message: She was difficult.
Received response from classify_sentence: rebel = 88, feminist = 9, hero = 2, angel = 0, newMessage = 29, wordResponse = difficult, PRIMARY: “rebel” = 88, SECONDARY: “feminist” = 9, TERTIARY: “hero” = 2, QUATERNARY: “angel” = 0, 29, difficult
The time of execution of above program is : 13646.11268043518ms
I received message from Unity
Input message: Florence was groundbreaking.
Received response from classify_sentence: rebel = 50, hero = 32, feminist = 15, angel = 1, newMessage = 30, wordResponse = Florence, PRIMARY: “rebel” = 50, SECONDARY: “hero” = 32, TERTIARY: “feminist” = 15, QUATERNARY: “angel” = 1, 30, Florence
The time of execution of above program is : 1678.5006523132324ms
I received message from Unity
Input message: She was tireless.
Received response from classify_sentence: hero = 50, feminist = 28, angel = 10, rebel = 10, newMessage = 31, wordResponse = tireless, PRIMARY: “hero” = 50, SECONDARY: “feminist” = 28, TERTIARY: “angel” = 10, QUATERNARY: “rebel” = 10, 31, tireless
The time of execution of above program is : 13567.806959152222ms
I received message from Unity
Input message: She was unyielding.
Received response from classify_sentence: rebel = 40, feminist = 31, hero = 22, angel = 5, newMessage = 32, wordResponse =, PRIMARY: “rebel” = 40, SECONDARY: “feminist” = 31, TERTIARY: “hero” = 22, QUATERNARY: “angel” = 5, 32,
The time of execution of above program is : 1312.4983310699463ms
I received message from Unity
Input message: She was altruistic.
Received response from classify_sentence: hero = 49, angel = 35, feminist = 12, rebel = 2, newMessage = 33, wordResponse = altruistic, PRIMARY: “hero” = 49, SECONDARY: “angel” = 35, TERTIARY: “feminist” = 12, QUATERNARY: “rebel” = 2, 33, altruistic
The time of execution of above program is : 13571.40040397644ms
I received message from Unity
Input message: She was exacting.
Received response from classify_sentence: feminist = 68, hero = 20, rebel = 7, angel = 3, newMessage = 34, wordResponse =, PRIMARY: “feminist” = 68, SECONDARY: “hero” = 20, TERTIARY: “rebel” = 7, QUATERNARY: “angel” = 3, 34,
The time of execution of above program is : 13241.159439086914ms
I received message from Unity
Input message: Florence was empathetic.
Received response from classify_sentence: feminist = 46, hero = 34, angel = 17, rebel = 2, newMessage = 35, wordResponse = Florence, PRIMARY: “feminist” = 46, SECONDARY: “hero” = 34, TERTIARY: “angel” = 17, QUATERNARY: “rebel” = 2, 35, Florence
The time of execution of above program is : 13635.77938079834ms
I received message from Unity
Input message: She was revolutionary.
Received response from classify_sentence: rebel = 74, hero = 18, feminist = 6, angel = 0, newMessage = 36, wordResponse = revolutionary, PRIMARY: “rebel” = 74, SECONDARY: “hero” = 18, TERTIARY: “feminist” = 6, QUATERNARY: “angel” = 0, 36, revolutionary
The time of execution of above program is : 13575.610160827637ms
I received message from Unity
Input message: She was critical.
Received response from classify_sentence: feminist = 52, rebel = 41, hero = 4, angel = 1, newMessage = 37, wordResponse = critical, PRIMARY: “feminist” = 52, SECONDARY: “rebel” = 41, TERTIARY: “hero” = 4, QUATERNARY: “angel” = 1, 37, critical
The time of execution of above program is : 13525.467157363892ms
I received message from Unity
Input message: She was selfless.
Received response from classify_sentence: hero = 49, feminist = 36, angel = 13, rebel = 1, newMessage = 38, wordResponse = selfless, PRIMARY: “hero” = 49, SECONDARY: “feminist” = 36, TERTIARY: “angel” = 13, QUATERNARY: “rebel” = 1, 38, selfless
The time of execution of above program is : 13557.161569595337ms
I received message from Unity
Input message: Florence was heroic.
Received response from classify_sentence: hero = 91, feminist = 4, angel = 2, rebel = 1, newMessage = 39, wordResponse = Florence, PRIMARY: “hero” = 91, SECONDARY: “feminist” = 4, TERTIARY: “angel” = 2, QUATERNARY: “rebel” = 1, 39, Florence
The time of execution of above program is : 13550.991296768188ms
I received message from Unity
Input message: She was driven.
Received response from classify_sentence: feminist = 39, rebel = 31, hero = 25, angel = 3, newMessage = 40, wordResponse =, PRIMARY: “feminist” = 39, SECONDARY: “rebel” = 31, TERTIARY: “hero” = 25, QUATERNARY: “angel” = 3, 40,
The time of execution of above program is : 13366.878271102905ms
I received message from Unity
Input message: She was assertive.
Received response from classify_sentence: rebel = 47, feminist = 36, hero = 14, angel = 2, newMessage = 41, wordResponse = assertive, PRIMARY: “rebel” = 47, SECONDARY: “feminist” = 36, TERTIARY: “hero” = 14, QUATERNARY: “angel” = 2, 41, assertive
The time of execution of above program is : 13567.355871200562ms
I received message from Unity
Input message: She was a role model.
Received response from classify_sentence: hero = 68, feminist = 23, angel = 6, rebel = 1, newMessage = 42, wordResponse = role, PRIMARY: “hero” = 68, SECONDARY: “feminist” = 23, TERTIARY: “angel” = 6, QUATERNARY: “rebel” = 1, 42, role
The time of execution of above program is : 1703.9999961853027ms
I received message from Unity
Input message: Florence was controversial.
Received response from classify_sentence: rebel = 87, feminist = 9, hero = 2, angel = 0, newMessage = 43, wordResponse = Florence, PRIMARY: “rebel” = 87, SECONDARY: “feminist” = 9, TERTIARY: “hero” = 2, QUATERNARY: “angel” = 0, 43, Florence
The time of execution of above program is : 13574.21875ms
I received message from Unity
Input message: She was relentless.
Received response from classify_sentence: feminist = 42, rebel = 27, hero = 25, angel = 3, newMessage = 44, wordResponse = relentless, PRIMARY: “feminist” = 42, SECONDARY: “rebel” = 27, TERTIARY: “hero” = 25, QUATERNARY: “angel” = 3, 44, relentless
The time of execution of above program is : 13546.181917190552ms
I received message from Unity
Input message: She was a legend.
Received response from classify_sentence: hero = 75, angel = 11, feminist = 11, rebel = 1, newMessage = 45, wordResponse = legend, PRIMARY: “hero” = 75, SECONDARY: “angel” = 11, TERTIARY: “feminist” = 11, QUATERNARY: “rebel” = 1, 45, legend
The time of execution of above program is : 13559.808254241943ms
I received message from Unity
Input message: She was uncompromising.
Received response from classify_sentence: rebel = 60, feminist = 24, hero = 12, angel = 1, newMessage = 46, wordResponse =, PRIMARY: “rebel” = 60, SECONDARY: “feminist” = 24, TERTIARY: “hero” = 12, QUATERNARY: “angel” = 1, 46,
The time of execution of above program is : 1299.1135120391846ms
I received message from Unity
Input message: She was a lifesaver.
Received response from classify_sentence: hero = 73, angel = 18, feminist = 6, rebel = 0, newMessage = 47, wordResponse = lifesaver, PRIMARY: “hero” = 73, SECONDARY: “angel” = 18, TERTIARY: “feminist” = 6, QUATERNARY: “rebel” = 0, 47, lifesaver
The time of execution of above program is : 1535.2892875671387ms
I received message from Unity
Input message: Florence was meticulous.
Received response from classify_sentence: hero = 57, feminist = 27, angel = 12, rebel = 3, newMessage = 48, wordResponse = Florence, PRIMARY: “hero” = 57, SECONDARY: “feminist” = 27, TERTIARY: “angel” = 12, QUATERNARY: “rebel” = 3, 48, Florence
The time of execution of above program is : 13569.668531417847ms
I received message from Unity
Input message: She was influential.
Received response from classify_sentence: hero = 54, feminist = 36, angel = 5, rebel = 3, newMessage = 49, wordResponse = influential, PRIMARY: “hero” = 54, SECONDARY: “feminist” = 36, TERTIARY: “angel” = 5, QUATERNARY: “rebel” = 3, 49, influential
The time of execution of above program is : 13550.156593322754ms
I received message from Unity
Input message: She was an icon.
Received response from classify_sentence: hero = 84, feminist = 9, angel = 5, rebel = 0, newMessage = 50, wordResponse = icon, PRIMARY: “hero” = 84, SECONDARY: “feminist” = 9, TERTIARY: “angel” = 5, QUATERNARY: “rebel” = 0, 50, icon
The time of execution of above program is : 13599.437475204468ms
I received message from Unity
Input message: She was harsh.
Received response from classify_sentence: feminist = 54, rebel = 38, hero = 5, angel = 2, newMessage = 51, wordResponse = harsh, PRIMARY: “feminist” = 54, SECONDARY: “rebel” = 38, TERTIARY: “hero” = 5, QUATERNARY: “angel” = 2, 51, harsh
The time of execution of above program is : 1680.4955005645752ms
I received message from Unity
Input message: She was a reformer.
Received response from classify_sentence: rebel = 35, feminist = 32, hero = 29, angel = 3, newMessage = 52, wordResponse = reformer, PRIMARY: “rebel” = 35, SECONDARY: “feminist” = 32, TERTIARY: “hero” = 29, QUATERNARY: “angel” = 3, 52, reformer
The time of execution of above program is : 1481.9433689117432ms
I received message from Unity
Input message: Florence was respected.
Received response from classify_sentence: hero = 45, feminist = 42, angel = 10, rebel = 1, newMessage = 53, wordResponse = Florence, PRIMARY: “hero” = 45, SECONDARY: “feminist” = 42, TERTIARY: “angel” = 10, QUATERNARY: “rebel” = 1, 53, Florence
The time of execution of above program is : 13622.615814208984ms
I received message from Unity
Input message: She was a hero.
Received response from classify_sentence: hero = 91, feminist = 4, angel = 3, rebel = 0, newMessage = 54, wordResponse = hero, PRIMARY: “hero” = 91, SECONDARY: “feminist” = 4, TERTIARY: “angel” = 3, QUATERNARY: “rebel” = 0, 54, hero
The time of execution of above program is : 13513.675928115845ms
I received message from Unity
Input message: She was passionate.
Received response from classify_sentence: rebel = 36, feminist = 29, hero = 26, angel = 7, newMessage = 55, wordResponse = passionate, PRIMARY: “rebel” = 36, SECONDARY: “feminist” = 29, TERTIARY: “hero” = 26, QUATERNARY: “angel” = 7, 55, passionate
The time of execution of above program is : 13598.807334899902ms
I received message from Unity
Input message: She was tough.
Received response from classify_sentence: feminist = 46, hero = 29, rebel = 22, angel = 1, newMessage = 56, wordResponse = tough, PRIMARY: “feminist” = 46, SECONDARY: “hero” = 29, TERTIARY: “rebel” = 22, QUATERNARY: “angel” = 1, 56, tough
The time of execution of above program is : 13600.864171981812ms
I received message from Unity
Input message: She was a symbol.
Received response from classify_sentence: hero = 38, feminist = 35, angel = 16, rebel = 8, newMessage = 57, wordResponse =, PRIMARY: “hero” = 38, SECONDARY: “feminist” = 35, TERTIARY: “angel” = 16, QUATERNARY: “rebel” = 8, 57,
The time of execution of above program is : 13540.885210037231ms
I received message from Unity
Input message: Florence was a nurse.
Received response from classify_sentence: feminist = 64, hero = 27, rebel = 4, angel = 3, newMessage = 58, wordResponse = Florence, PRIMARY: “feminist” = 64, SECONDARY: “hero” = 27, TERTIARY: “rebel” = 4, QUATERNARY: “angel” = 3, 58, Florence
The time of execution of above program is : 13613.700151443481ms
I received message from Unity
Input message: She was a leader.
Received response from classify_sentence: hero = 76, feminist = 19, angel = 3, rebel = 1, newMessage = 59, wordResponse = leader, PRIMARY: “hero” = 76, SECONDARY: “feminist” = 19, TERTIARY: “angel” = 3, QUATERNARY: “rebel” = 1, 59, leader
The time of execution of above program is : 13575.09160041809ms
I received message from Unity
Input message: She was beloved.
Received response from classify_sentence: hero = 52, feminist = 26, angel = 16, rebel = 4, newMessage = 60, wordResponse =, PRIMARY: “hero” = 52, SECONDARY: “feminist” = 26, TERTIARY: “angel” = 16, QUATERNARY: “rebel” = 4, 60,
The time of execution of above program is : 1322.1759796142578ms
I received message from Unity
Input message: She was complex.
Received response from classify_sentence: rebel = 38, feminist = 35, hero = 18, angel = 7, newMessage = 61, wordResponse = complex, PRIMARY: “rebel” = 38, SECONDARY: “feminist” = 35, TERTIARY: “hero” = 18, QUATERNARY: “angel” = 7, 61, complex
The time of execution of above program is : 13645.036935806274ms
I received message from Unity
Input message: She was a fighter.
Received response from classify_sentence: rebel = 65, feminist = 17, hero = 16, angel = 0, newMessage = 62, wordResponse = fighter, PRIMARY: “rebel” = 65, SECONDARY: “feminist” = 17, TERTIARY: “hero” = 16, QUATERNARY: “angel” = 0, 62, fighter
The time of execution of above program is : 2843.9981937408447ms