#Speechfinder Script

97 messages · Page 1 of 1 (latest)

molten ivy
#

You can copy and paste the two commands in game to download the 2 files needed for this script to work.
;repo download speechfinder.lic
;repo download speechtonesandverbs.rb


To search:
;speechfinder b WORD (Will search VERBS or TONES for exact, closest, or best match)
;speechfinder v WORD (Will search only VERBS for exact, closest, or best match)
;speechfinder t WORD (Will search only TONES for exact, closest, or best match)

Example of output.
>;speechfinder b happy
        --- Lich: speechfinder active.
        [speechfinder: Debug: script.vars = ["b happy", "b", "happy"]]
        [speechfinder: Searching both Verbs and Tones for 'happy':]
        [speechfinder: No exact match found. Closest match for 'happy' =VERBS:]
        [speechfinder: 
             =imply
                  (Category: Soothe/Comment)
                  suggest, hint, or indicate something without stating it directly; involve or entail by implication.]
        [speechfinder: ]
        [speechfinder: Matching items for 'happy' :TONES:]
        [speechfinder: 
             :happy
                  (Category: Happy)
                  speaking in a joyful, content, or satisfied manner; showing a positive mood.]
          
>;speechfinder v happy
        --- Lich: speechfinder active.
        [speechfinder: Debug: script.vars = ["v happy", "v", "happy"]]
        [speechfinder: No exact match found. Closest match for 'happy' =VERBS:]
        [speechfinder: 
             =imply
                  (Category: Soothe/Comment)
                  suggest, hint, or indicate something without stating it directly; involve or entail by implication.]

>;speechfinder t happy
        --- Lich: speechfinder active.
        [speechfinder: Debug: script.vars = ["t happy", "t", "happy"]]
        [speechfinder: Matching items for 'happy' :TONES:]
        [speechfinder: 
             :happy
                  (Category: Happy)
                  speaking in a joyful, content, or satisfied manner; showing a positive mood.]
  

Script created with Chat GPT.

1.0.0 (2024-09-14)
    - Initial release.
1.1.0 (2024-09-15)
    - Tones have been added and can be searched via the command ;send tfind TONE
    - Output has been limited to 5 speech tones or 5 speech verbs to limit screen scoll.
    - Changed script from a loop-based structure to an execution-based structure.
    - Added b variable option to search both verbs and tones at the same time.
    
Visit https://discord.com/channels/226045346399256576/1284700864132546602 to discuss and offer feedback.```
smoky dove
#

More RP tools are always good. Will check it out.

molten ivy
#

Im about to drop a big update that includes tones as well

#
--- sent: tfind enthus
[speechfinder: Matching items for 'enthus' in TONES_DB:]
[speechfinder: 
     hearty
          (Category: Sound)
          speaking in a robust, enthusiastic, and energetic manner; often conveying sincerity and warmth.]
[speechfinder: 
     energetic
          (Category: Manner) | (Category: Excited/Bored)
          speaking in a lively, vigorous, or dynamic manner; showing enthusiasm.]
[speechfinder: 
     perfunctory
          (Category: Manner) | (Category: Rude/Impolite) | (Category: Excited/Bored)
          speaking in a routine, indifferent, or superficial manner; lacking enthusiasm or depth.]
[speechfinder: 
     sleepy
          (Category: Manner)
          speaking in a drowsy, lethargic, or unenergetic manner; lacking alertness or enthusiasm.]
[speechfinder: 
     ardent
          (Category: Happy) | (Category: Friendly/Polite) | (Category: Excited/Bored)
          speaking in a passionate, enthusiastic, or fervent manner; showing strong feelings.]
Billowing gusts of heavy snow buffet your face.
>;send tfind evil
--- sent: tfind evil
[speechfinder: Matching items for 'evil' in TONES_DB:]
[speechfinder: 
     devilish
          (Category: Happy) | (Category: Annoyed) | (Category: Excited/Bored)
          speaking in a playful, mischievous, or roguish manner; often with a hint of naughtiness.]
[speechfinder: 
     wicked
          (Category: Rude/Impolite) | (Category: Angry)
          speaking in a manner that is evil, mischievous, or morally wrong; often playfully so.]
[speechfinder: 
     diabolical
          (Category: Angry)
          speaking in a manner that is wicked, evil, or devilish; often suggesting malice.]
[speechfinder: 
     malevolent
          (Category: Angry)
          speaking in a manner that shows a desire to do harm or evil; malicious.]```
I've limited output to 5 matches as it can spam your entire screen otherwise
#
--- sent: tfind obscure
[speechfinder: No matching items found for 'obscure' in TONES_DB.]
>;send vfind obscure
--- sent: vfind obscure
[speechfinder: No exact match found in VERBS_DB. Closest match for 'obscure':]
[speechfinder:      assure
          (Category: Academic/Sermonic)
          tell someone something positively to dispel doubts or fears; make someone feel confident about something.]```

The search seems fairly solid in my opinion and does a good job at close matches.

```>;send vfind supercalifragilisticexpialidocious
--- sent: vfind supercalifragilisticexpialidocious
[speechfinder: No matching items found for 'supercalifragilisticexpialidocious' in VERBS_DB.]
>;send tfind supercalifragilisticexpialidocious
--- sent: tfind supercalifragilisticexpialidocious
[speechfinder: No matching items found for 'supercalifragilisticexpialidocious' in TONES_DB.]```

The more specific of course the less likely a match.
#

If anyone notices a bad response please let me know. The tones and verbs should all be able to be used in game.

molten ivy
#

Just posted another update after playing with it for a couple of hours. It's a single execution rather than a loop now.

Will display output better now.
EXACT MATCH
CLOSEST MATCH
CATEGORY MATCHES
NO MATCHES AT ALL

Option to search both verbs and tones at the same time via b.

Commands are now
;speechfinder b WORD (Will search VERBS or TONES for exact, closest, or best match)
;speechfinder v WORD (Will search only VERBS for exact, closest, or best match)
;speechfinder t WORD (Will search only TONES for exact, closest, or best match)

;speechfinder b happy

        [speechfinder: Debug: script.vars = ["b happy", "b", "happy"]]
        [speechfinder: Searching both Verbs and Tones for 'happy':]
        [speechfinder: No exact match found. Closest match for 'happy' =VERBS:]
        [speechfinder: 
             =imply
                  (Category: Soothe/Comment)
                  suggest, hint, or indicate something without stating it directly; involve or entail by implication.]
        [speechfinder: ]
        [speechfinder: Matching items for 'happy' :TONES:]
        [speechfinder: 
             :happy
                  (Category: Happy)
                  speaking in a joyful, content, or satisfied manner; showing a positive mood.]```
#

;speechfinder v happy

        [speechfinder: Debug: script.vars = ["v happy", "v", "happy"]]
        [speechfinder: No exact match found. Closest match for 'happy' =VERBS:]
        [speechfinder: 
             =imply
                  (Category: Soothe/Comment)
                  suggest, hint, or indicate something without stating it directly; involve or entail by implication.]```

>;speechfinder t happy
```        --- Lich: speechfinder active.
        [speechfinder: Debug: script.vars = ["t happy", "t", "happy"]]
        [speechfinder: Matching items for 'happy' :TONES:]
        [speechfinder: 
             :happy
                  (Category: Happy)
                  speaking in a joyful, content, or satisfied manner; showing a positive mood.]```

Recommend adding a wrayth highlight

[speechfinder:

and making it black.
#

Cleans up the output a lot to improve readability.

golden sierra
#

I find this really helpful. Thank you!

tender grail
#

You are the hero we need and don't deserve

molten ivy
#

If anyone has an idea for other scripts to assist with roleplaying feel free to make suggestions.

molten ivy
#

Testing relevance scoring for matches as it should provide better search results.

molten ivy
#

New update for speechfinder.lic on the repository for download.
I tried to improve the searching and simply use.

;speechfinder TERM
Can add as many terms as you want now and it will always search tones or verbs and provide the most relevant matches

--- Lich: speechfinder active.
[speechfinder: Showing 5 of 7 total matching speech items:]
[speechfinder: 
     :heavy-hearted]
[speechfinder:           (Category: Unhappy)]
[speechfinder:           Definition: speaking in a manner that shows deep sadness, sorrow, or grief.]
[speechfinder: 
     :thunderous]
[speechfinder:           (Category: Sound)]
[speechfinder:           Definition: speaking in a very loud, booming, or forceful manner; often conveying power, anger, or excitement.]
[speechfinder: 
     :heavy]
[speechfinder:           (Category: Unhappy)]
[speechfinder:           Definition: speaking in a slow, labored, or burdened manner; often reflecting sadness or difficulty.]
[speechfinder: 
     =thunder]
[speechfinder:           (Category: Sound)]
[speechfinder:           Definition: speak loudly, forcefully, or with great authority; make a booming sound.]
[speechfinder: 
     :thick]
[speechfinder:           (Category: Sound)]
[speechfinder:           Definition: speaking in a way that is heavy, muffled, or difficult to understand; often due to an accent or emotion.]
[speechfinder: 
Displaying the top 5 most relevant results. There are 2 more matching items.]
--- Lich: speechfinder has exited.```
#

Having the [speechfinder: highlighted in black helps a lot with readability of output.

#

It filters out matches that are 3 letters or less. i and to are not matched in this example

#

I'm going to go through the database and try to expand on the definitions as much as possible while adding some synonyms to each TONE or VERB.

#
  "Sound": {
    "affected" => "speaking in an artificial, pretentious, or exaggerated manner, often intended to impress others.",
    "austere" => "speaking in a severe, strict, or unadorned manner; lacking warmth or softness.",
    "brazen" => "speaking in a bold, shameless, or unapologetically confident way, often disregarding social norms.",
    "breathless" => "speaking in a way that shows excitement, surprise, or exertion; lacking smooth, uninterrupted flow.",
    "careless" => "speaking in a way that shows a lack of attention or concern; often marked by mistakes or a lack of refinement.",
    "clear" => "speaking in a way that is easily heard, understood, and unambiguous; distinct and straightforward.",
    "deep" => "speaking in a low-pitched, resonant manner; often conveying authority, seriousness, or calm.",
    "faint" => "speaking in a low volume or barely audible manner; often weak, hesitant, or lacking confidence.",
    "feeble" => "speaking in a weak, frail, or ineffective manner; lacking strength or vigor.",
    "hearty" => "speaking in a robust, enthusiastic, and energetic manner; often conveying sincerity and warmth.",
    "hoarse" => "speaking with a rough, harsh, or strained voice, often due to illness or strain.",
    "hushed" => "speaking in a quiet, subdued, or soft manner; often used to convey secrecy, calm, or respect.",
    "husky" => "speaking with a deep, slightly rough, and throaty voice; often perceived as seductive or emotional.",
    "indistinct" => "speaking in a way that is unclear or difficult to understand; lacking articulation or definition.",
    "laughing" => "speaking in a way that is interspersed with or characterized by laughter; often cheerful or light-hearted.",
    "loud" => "speaking in a high volume; often perceived as forceful, commanding, or attention-seeking.",
    "melodic" => "speaking in a musical, rhythmic, or harmonious manner; pleasing and flowing in sound.",
    "monotone" => "speaking in an unvarying pitch or tone; lacking inflection, emotion, or variation in speech.",
    "mushy" => "speaking in an overly sentimental, soft, or excessively emotional manner; often perceived as insincere.",
    "nasal" => "speaking with a sound that resonates through the nose; often high-pitched and whiny.",
    "plodding" => "speaking in a slow, laborious, and unvaried manner; lacking dynamism or engagement.",
    "quavering" => "speaking in a trembling or unsteady voice; often reflecting nervousness or emotional strain.",
    "quiet" => "speaking in a soft or low volume; often gentle, calm, or subdued in tone.",
    "raspy" => "speaking with a harsh, scratchy, or grating voice; often perceived as rough or coarse.",
    "rough" => "speaking in a coarse, abrasive, or unrefined manner; lacking smoothness or polish.",
    "shrill" => "speaking in a high-pitched, piercing, or sharp manner; often jarring or grating to the ear.",
    "slow" => "speaking at a leisurely pace; often deliberate, thoughtful, or lacking urgency.",
    "soft" => "speaking in a gentle, low volume; often tender, soothing, or restrained in tone.",
    "squeaky" => "speaking in a high-pitched, sharp, or shrill manner; often perceived as childlike or annoying.",
    "succinct" => "speaking in a brief and clear manner; concise and to the point without unnecessary detail.",
    "thick" => "speaking in a way that is heavy, muffled, or difficult to understand; often due to an accent or emotion.",
    "throaty" => "speaking with a deep, resonant sound originating from the throat; often warm, rich, or husky.",
    "thunderous" => "speaking in a very loud, booming, or forceful manner; often conveying power, anger, or excitement."
  },```

This is the current entries for SOUND tones.
molten ivy
#

Finished the synonym update
;repo download speechtonesandverbs.rb

molten ivy
#
--- Lich: speechfinder active.
[speechfinder: Showing 1 of 1 total matching speech items:]
[speechfinder: 
     :lovelorn]
[speechfinder:           (Category: Unhappy | Uncomfortable | Baffled/Worried)]
[speechfinder:           Definition: speaking in a manner that shows sadness or disappointment due to unrequited
                                love. Synonyms: heartbroken, forlorn, disappointed.]
--- Lich: speechfinder has exited.```

Working on better search results for this type of instance.  Love should return more results imo.
molten ivy
#

Finally got it working. Needed to add some stripping of suffixes.

karmic oyster
#

Hi Ruse, I'm encountering this error with the current version.

--- Lich: speechfinder active.
[speechfinder: Showing 5 of 166 total matching speech items:]
[speechfinder: 
     =allow]
[speechfinder:           (Category: Soothe/Comment | Debate)]
--- Lich: error: undefined method `wrap_text' for main:Object
    speechfinder:317:in `block in display_speech_matches'
    speechfinder:310:in `each'
--- Lich: speechfinder has exited.```
karmic oyster
#

Defining wrap_text took care of this for me.

molten ivy
karmic oyster
#

excellent thank you!

#

I love the changes you're making here. I've been practicing with tones, and as you know it's just .. a lot to learn. This has already helped so much. Thank you!

molten ivy
#

You're welcome, I think there's a lot of stuff already for combat so I wanted to work on something that would help me too instead of having to keep a cheat sheet open and then search google for definitions cause sometimes I forget what words mean.

I sort of understand how the matching is working to an extent at this point and it makes sense most of the time and usually provides 1 or 2 matches that make total sense for the word or words I used. Feel free to keep providing feedback if anything seems off or if you have an idea for a way to expand its uses or features.

#

What I'm thinking of doing to expand it is to have it track all the tones and verbs by line parsing. Anytime it sees your character use a tone or verb it would save that tone or verb to a file.

Overtime a pattern would emerge that is basically your favorites that define your character and the script could remind you of your favorites and offer suggestions for new tones and verbs with similar definitions or synonyms.

molten ivy
#
You lovingly say, "I hope you'll always be the same."
>
[test: Detected speech pattern: lovingly - "I hope you'll always be the same."]
[test: Top suggestions for 'lovingly' or 'I hope you'll always be the same.':]
[test: Showing 5 of 5 total matching speech items:]
[test: 
     :reproving]
[test:   (Category: Annoyed | Rude/Impolite | Angry)]
[test:   Definition: speaking in a manner that shows disapproval or criticism; reprimanding. Synonyms: critical,
                 disapproving, admonishing.]
[test: 
     =coo]
[test:   (Category: Happy/Amused | Excited/Interested)]
[test:   Definition: speak in a soft gentle voice, often in a loving or affectionate way; murmur sweetly. Synonyms:
                 murmur, whisper, croon.]
[test: 
     :amorous]
[test:   (Category: Happy | Friendly/Polite | Excited/Bored)]
[test:   Definition: speaking in a loving, romantic, or passionate manner; showing affection or desire. Synonyms:
                 affectionate, loving, passionate.]
[test: 
     :loving]
[test:   (Category: Friendly/Polite)]
[test:   Definition: speaking in a manner that shows affection, care, or deep concern for others. Synonyms: affectionate,
                 caring, tender.]
[test: 
     :lovelorn]
[test:   (Category: Unhappy | Uncomfortable | Baffled/Worried)]
[test:   Definition: speaking in a manner that shows sadness or disappointment due to unrequited love. Synonyms:
                 heartbroken, forlorn, disappointed.]
>'=coo I hope you'll always be the same
You coo, "I hope you'll always be the same."
>
[test: Detected speech pattern: coo - "I hope you'll always be the same."]
[test: Top suggestions for 'coo' or 'I hope you'll always be the same.':]
[test: Showing 5 of 5 total matching speech items:]
[test: 
     :amicable]
[test:   (Category: Friendly/Polite)]
[test:   Definition: speaking in a cooperative, friendly, or peaceful manner; showing goodwill. Synonyms: peaceful,
                 cooperative, harmonious.]
[test: 
     =purr]
[test:   (Category: Sound)]
[test:   Definition: make a low continuous vibratory sound, like a cat; speak softly in a contented manner. Synonyms:
                 murmur, hum, coo.]
[test: 
     :unhelpful]
[test:   (Category: Annoyed | Rude/Impolite)]
[test:   Definition: speaking in a manner that lacks assistance, support, or cooperation; often dismissive. Synonyms:
                 dismissive, uncooperative, obstructive.]
[test: 
     :cool]
[test:   (Category: Angry)]
[test:   Definition: speaking in a calm, detached, or unemotional manner; often perceived as unfriendly. Synonyms:
                 detached, composed, impassive.]
[test: 
     =coo]
[test:   (Category: Happy/Amused | Excited/Interested)]
[test:   Definition: speak in a soft gentle voice, often in a loving or affectionate way; murmur sweetly. Synonyms:
                 murmur, whisper, croon.]```

Line monitoring was pretty easy to implement.  Current implementation matches the tone or verb you use and provides a match for that.
#
You say, "I really hate you."
>
[test: Detected default verb 'say', ignoring verb and matching based on spoken text only.]
[test: Top suggestions for 'say' or 'I really hate you.':]
[test: Showing 2 of 2 total matching speech items:]
[test: 
     :hateful]
[test:   (Category: Angry)]
[test:   Definition: speaking in a manner that shows intense dislike, hostility, or malice. Synonyms: hostile, spiteful,
                 malicious.]
[test: 
     =realize]
[test:   (Category: Academic/Sermonic | Debate)]
[test:   Definition: become fully aware of something as a fact; understand clearly; achieve or fulfill a goal or ambition.
                 Synonyms: understand, comprehend, grasp, recognize.]
>'I enjoyed our conversation
You say, "I enjoyed our conversation."
>
[test: Detected default verb 'say', ignoring verb and matching based on spoken text only.]
[test: Top suggestions for 'say' or 'I enjoyed our conversation.':]
[test: Showing 5 of 5 total matching speech items:]
[test: 
     :trepidatious]
[test:   (Category: Unhappy | Uncomfortable)]
[test:   Definition: speaking in a manner that shows fear, apprehension, or anxiety about potential danger. Synonyms:
                 anxious, apprehensive, fearful.]
[test: 
     =sound out]
[test:   (Category: Sound | Confused/Querulous)]
[test:   Definition: pronounce each sound in a word slowly and clearly; explore an idea cautiously. Synonyms: enunciate,
                 articulate, explore.]
[test: 
     :unconvincing]
[test:   (Category: Manner | Uncomfortable)]
[test:   Definition: speaking in a manner that fails to persuade or gain belief; lacking credibility or force. Synonyms:
                 doubtful, unpersuasive, weak.]
[test: 
     =caution]
[test:   (Category: Soothe/Comment | Academic/Sermonic)]
[test:   Definition: warn someone about a potential danger, risk, or problem; advise to take care or avoid a specific
                 action. Synonyms: warn, advise, forewarn.]
[test: 
     :conversational]
[test:   (Category: Friendly/Polite)]
[test:   Definition: speaking in a friendly, informal, or chatty manner; engaging in casual dialogue. Synonyms: chatty,
                 informal, friendly.]
You feel more refreshed.```
molten ivy
#

Pretty close to releasing vocabulary

This will run in the background and monitor all of your speech. It will offer suggestions based on your tone or verb used. I'm just adding a command option to limit output to the single best tone or verb or the 3 best tones and verbs.

#

;repo download vocabulary.lic

#
>
[vocabulary: Detected default verb 'say', ignoring verb and matching based on spoken text only.]
[vocabulary: Top suggestions for 'say' or 'I love magical unicorns and sparkly butterflies.':]
[vocabulary: Showing 5 of 5 total matching speech items:]
[vocabulary: 
     =splutter]
[vocabulary:   (Category: Sound | Angry)]
[vocabulary:   Definition: speak fast and incoherently, often due to confusion, agitation, or surprise. Synonyms: sputter,
                 stammer, babble.]
[vocabulary: 
     :lovelorn]
[vocabulary:   (Category: Unhappy | Uncomfortable | Baffled/Worried)]
[vocabulary:   Definition: speaking in a manner that shows sadness or disappointment due to unrequited love. Synonyms:
                 heartbroken, forlorn, disappointed.]
[vocabulary: 
     =witter]
[vocabulary:   (Category: Sound | Happy/Amused | Excited/Interested)]
[vocabulary:   Definition: speak at length about trivial matters; ramble on in a pointless or annoying way. Synonyms: babble,
                 prattle, ramble.]
[vocabulary: 
     =chatter]
[vocabulary:   (Category: Soothe/Comment | Happy/Amused | Excited/Interested)]
[vocabulary:   Definition: talk rapidly, incessantly, or about trivial matters; make continuous, light conversation or noise.
                 Synonyms: babble, prattle, gabble.]
[vocabulary: 
     =mutter]
[vocabulary:   (Category: Rude/Impolite | Angry | Confused/Querulous | Sad/Demoralized)]
[vocabulary:   Definition: say something in a low or barely audible voice, especially in dissatisfaction or irritation; murmur
                 under breath. Synonyms: murmur, grumble, whisper.]```
karmic oyster
#

Hello! Some feedback. Is it possible to have an option by request to reduce the output, so that ;speechfinder only returns the advised tones and not all the definitions?

molten ivy
#

Yup, can probably work that in

molten ivy
# karmic oyster Hello! Some feedback. Is it possible to have an option by request to reduce the ...

;test greed --matches=6 --tones
--- Lich: test active.
[test: Showing 6 of 189 total matching speech items:]
[test:
:greedy]
[test: (Category: Excited/Bored)]
[test: Definition: speaking in a manner that shows intense desire for more than what is needed; often for wealth or
power. Synonyms: covetous, selfish, grasping.]
[test:
:covetous]
[test: (Category: Unhappy | Annoyed | Excited/Bored)]
[test: Definition: speaking in a manner that shows an envious desire for others' possessions; greedy. Synonyms: envious,
greedy, desirous.]
[test:
:heedless]
[test: (Category: Happy | Rude/Impolite | Angry | Uncomfortable | Excited/Bored)]
[test: Definition: speaking in a careless, thoughtless, or inattentive manner; disregarding caution. Synonyms: careless,
inattentive, thoughtless.]
[test:
:laborious]
[test: (Category: Manner | Annoyed | Serious)]
[test: Definition: speaking in a tedious, painstaking, or effortful manner; showing great effort. Synonyms: painstaking,
arduous, strenuous.]
[test:
:tormented]
[test: (Category: Unhappy | Uncomfortable)]
[test: Definition: speaking in a manner that shows suffering, anguish, or great distress; deeply troubled. Synonyms:
anguished, suffering, distressed.]
[test:
:astounded]
[test: (Category: Baffled/Worried | Excited/Bored)]
[test: Definition: speaking in a manner that shows great surprise, amazement, or disbelief. Synonyms: amazed,
astonished, shocked.]
[test:
Displaying the top 6 most relevant results. There are 183 more matching items.]
--- Lich: test has exited.

#
--- Lich: test active.
[test: Showing 10 of 99 total matching speech items:]
[test: 
     =greet]
[test: 
     =thunder]
[test: 
     =hail]
[test: 
     =rejoice]
[test: 
     =agonize]
[test: 
     =exult]
[test: 
     =fuss]
[test: 
     =disagree]
[test: 
     =reminisce]
[test: 
     =grumble]
[test: 
Displaying the top 10 most relevant results. There are 89 more matching items.]
--- Lich: test has exited.```

Once you enter the output command it remembers your preference so you don't have to keep typing the command.

```>;test mistake
--- Lich: test active.
[test: Showing 10 of 48 total matching speech items:]
[test: 
     =chide]
[test: 
     =choke out]
[test: 
     =surmise]
[test: 
     =promise]
[test: 
     =reminisce]
[test: 
     =commiserate]
[test: 
     =attest]
[test: 
     =stress]
[test: 
     =distract]
[test: 
     =dismiss]
[test: 
Displaying the top 10 most relevant results. There are 38 more matching items.]
--- Lich: test has exited.```
karmic oyster
#

I'll definitely set up aliases for each version, and maybe do some of my own formatting management for the truncated output so it doesn't fill my screen & log.

#

thank you so much, it's looking great!

molten ivy
#
--- Lich: test active.
[test: :aggravated           (Ranked #10)]
[test: :disagreeable         (Ranked #9)]
[test: :agreeable            (Ranked #8)]
[test: :exultant             (Ranked #7)]
[test: :tormented            (Ranked #6)]
[test: :astounded            (Ranked #5)]
[test: :laborious            (Ranked #4)]
[test: :heedless             (Ranked #3)]
[test: :covetous             (Ranked #2)]
[test: :greedy               (Ranked #1)]
[test: 
Displaying the top 10 most relevant results. There are 175 more matching items.]
--- Lich: test has exited.```

No definitions will remove the extra spacing
molten ivy
molten ivy
#

Ok new version is on repo but does require a new ruby gem installation if you don't already have it installed.
cd C:\Ruby4Lich5\3.2.2\bin
gem install fast-stemmer

molten ivy
#

I'm going to clean up the categories for the tones and verbs, try to diversify them further and get rid of the duplicates by making them less broad in general.

The categories are copied from the wiki list but don't make sense sometimes

molten ivy
#

Here is an example of the tones recategorized

molten ivy
#

I also just realized that the wiki list is much smaller than the in game list.

There are 670 tones and 373 speech verbs.

molten ivy
#

Going to utilize these 42 categories to sort the 670 tones and 373 speech verbs. Each category (if divided equally) would have 24 tones or speech verbs

molten ivy
#
  "Accusing" => {
    "category" => "Accusation & Blame",
    "definition" => "Assigning fault or responsibility to someone, often in a confrontational or critical manner.",
    "synonyms" => ["Blaming", "Condemning", "Challenging", "Reproaching"],
    "type" => "tone"
  },
  "Adoring" => {
    "category" => "Affection and Love",
    "definition" => "Expressing deep love, admiration, or affection.",
    "synonyms" => ["Loving", "Devoted", "Cherishing", "Fond"],
    "type" => "tone"
  },
  "Admiring" => {
    "category" => "Respect & Appreciation",
    "definition" => "Expressing respect, appreciation, or warm approval.",
    "synonyms" => ["Appreciative", "Respectful", "Adoring", "Reverent"],
    "type" => "tone"
  },
  "Acerbic" => {
    "category" => "Arrogance & Conflict",
    "definition" => "Sharp, biting, and often harsh in tone, typically expressing criticism or sarcasm.",
    "synonyms" => ["Bitter", "Caustic", "Cutting", "Harsh"],
    "type" => "tone"
  },
  "Acrid" => {
    "category" => "Disgust & Aversion",
    "definition" => "Bitter, harsh, and unpleasant in tone, often expressing strong distaste or contempt.",
    "synonyms" => ["Bitter", "Caustic", "Harsh", "Scathing"],
    "type" => "tone"
  },
  "Adamant" => {
    "category" => "Confidence & Assurance",
    "definition" => "Firm and unyielding in one’s stance or beliefs, refusing to be persuaded or to change one’s mind.",
    "synonyms" => ["Unyielding", "Inflexible", "Resolute", "Determined"],
    "type" => "tone"
  },
  "Abashed" => {
    "category" => "Embarrassment & Shame",
    "definition" => "Feeling or showing embarrassment or shame.",
    "synonyms" => ["Embarrassed", "Humiliated", "Ashamed", "Chagrined"],
    "type" => "tone"
  },
  "Abrupt" => {
    "category" => "Rudeness & Incivility",
    "definition" => "Sudden and curt in manner, often perceived as rude or blunt.",
    "synonyms" => ["Blunt", "Curt", "Brusque", "Terse"],
    "type" => "tone"
  },
  "Abrasive" => {
    "category" => "Rudeness & Incivility",
    "definition" => "Showing little concern for others; harsh and often causing discomfort.",
    "synonyms" => ["Harsh", "Rough", "Gruff", "Brusque"],
    "type" => "tone"
  },
  "Absent" => {
    "category" => "Apathy & Disinterest",
    "definition" => "Showing a lack of attention, presence, or interest, often appearing disengaged.",
    "synonyms" => ["Distracted", "Detached", "Uninvolved", "Inattentive"],
    "type" => "tone"
  },
  "Absentminded" => {
    "category" => "Uncertainty & Doubt",
    "definition" => "Being distracted or lost in thought, showing a lack of focus or attention to the present moment.",
    "synonyms" => ["Distracted", "Unfocused", "Forgetful", "Preoccupied"],
    "type" => "tone"
  },
}

Going to take awhile to go through each tone and verb 1 at a time and sort them but this will be the new format.

#

I think the matching and search logic is spot on but the database is a limiting factor. Going through one by one will ensure accuracy as well.

molten ivy
#

Made it into the d's so far. Been a few categories added and some refinement.

molten ivy
#

If anyone would like to review the new database so far and provide feedback feel free

#

The goal is for exact matches to be first, definition matches to be second, category matches to be third, and synonyms fourth as far as looking for relevance. There should be less contradictory output in general. The matching script will need to be updated a little to utilize the new format.

molten ivy
molten ivy
#
[test: 
  :Apologetic       (Category: Humility & Kindness)
                    Definition: Expressing regret or remorse for one's actions or words.]
[test: 
  :Amiable          (Category: Humility & Kindness)
                    Definition: Displaying a friendly and pleasant manner, showing warmth and approachability.]
[test: 
  :Affable          (Category: Humility & Kindness)
                    Definition: Friendly, warm, and easy to approach, often displaying a modest and considerate demeanor.]
[test: 
  :Fond             (Category: Affection & Love)
                    Definition: Expressing warmth, affection, or tenderness towards someone or something.]
[test: 
  :Adoring          (Category: Affection & Love)
                    Definition: Expressing deep love, admiration, or affection.]
[test: 
  :tender           (Category: Humility & Kindness)
                    Definition: Showing gentleness, care, and affection, often expressing concern for others' well-being.]
[test: 
  :Affectionate     (Category: Affection & Love)
                    Definition: Displaying warmth, care, and fondness toward others, often through words or actions.]
[test: 
  :Amorous          (Category: Affection & Love)
                    Definition: Showing, feeling, or relating to romantic love or strong attraction.]
[test: 
  :Lovelorn         (Category: Sadness & Melancholy)
                    Definition: Experiencing feelings of love and longing, often accompanied by sadness or heartache.]
[test: 
  :Loving           (Category: Affection & Love)
                    Definition: Showing deep affection, care, and warmth towards others.]
[test: 
Displaying the top 10 most relevant results. There are 43 more matching items.]
--- Lich: test has exited.```

This is the update so far.
molten ivy
#
--- Lich: speechfinder active.
[speechfinder: 
  :affectionate     (Category: Friendly/Polite)
                    Definition: speaking in a warm, loving, or caring manner; showing fondness. Synonyms: loving, caring, fond.]
[speechfinder: 
  :fond             (Category: Happy)
                    Definition: speaking in a loving, affectionate, or tender manner; showing warmth or preference. Synonyms: affectionate, loving, tender.]
[speechfinder: 
  :adoring          (Category: Friendly/Polite)
                    Definition: speaking in a loving, affectionate, or deeply appreciative manner. Synonyms: loving, doting, affectionate.]
[speechfinder: 
  :loving           (Category: Friendly/Polite)
                    Definition: speaking in a manner that shows affection, care, or deep concern for others. Synonyms: affectionate, caring, tender.]
[speechfinder: 
  =coo              (Category: Happy/Amused | Excited/Interested)
                    Definition: speak in a soft gentle voice, often in a loving or affectionate way; murmur sweetly. Synonyms: murmur, whisper, croon.]
[speechfinder: 
  :amorous          (Category: Happy | Friendly/Polite | Excited)
                    Definition: speaking in a loving, romantic, or passionate manner; showing affection or desire. Synonyms: affectionate, loving, passionate.]
[speechfinder: 
  :lovelorn         (Category: Unhappy | Uncomfortable | Baffled/Worried)
                    Definition: speaking in a manner that shows sadness or disappointment due to unrequited love. Synonyms: heartbroken, forlorn, disappointed.]
--- Lich: speechfinder has exited.```
This is the older version.
molten ivy
#

NEW

--- Lich: test active.
[test: Search terms: love someone passionately, love, someone, passionately]
[test: Terms (stems): love someone passion, love, someon, passion]
[test: 
  :Bleak            (Category: Sadness & Melancholy)
                    Definition: Offering little or no hope; depressing or grim in outlook.
                    Synonyms: gloomy, depressing, dismal, desolate]
[test: 
  =coo              (Category: Affection & Love)
                    Definition: To speak in a soft, gentle, and loving manner, often resembling the sound made by doves.
                    Synonyms: murmur, whisper, caress]
[test: 
  :Loving           (Category: Affection & Love)
                    Definition: Showing deep affection, care, and warmth towards others.
                    Synonyms: affectionate, tender, caring, adoring]
[test: 
  :Adoring          (Category: Affection & Love)
                    Definition: Expressing deep love, admiration, or affection.
                    Synonyms: loving, devoted, cherishing, fond]
[test: 
  :Affectionate     (Category: Affection & Love)
                    Definition: Displaying warmth, care, and fondness toward others, often through words or actions.
                    Synonyms: loving, caring, fond, tender]
[test: 
  :Fond             (Category: Affection & Love)
                    Definition: Expressing warmth, affection, or tenderness towards someone or something.
                    Synonyms: loving, affectionate, warm, caring]
[test: 
  :Flirtatious      (Category: Affection & Love)
                    Definition: Displaying playful or romantic interest in a teasing or lighthearted manner.
                    Synonyms: teasing, playful, amorous]
[test: 
  :Ardent           (Category: Affection & Love)
                    Definition: Enthusiastic or passionate; showing intense emotion or warmth.
                    Synonyms: passionate, fervent, zealous, enthusiastic]
[test: 
  :Amorous          (Category: Affection & Love)
                    Definition: Showing, feeling, or relating to romantic love or strong attraction.
                    Synonyms: passionate, romantic, affectionate, loving]
[test: 
  :Lovelorn         (Category: Sadness & Melancholy)
                    Definition: Experiencing feelings of love and longing, often accompanied by sadness or heartache.
                    Synonyms: heartbroken, sorrowful, yearning, desolate]

Displaying the top 10 most relevant results. There are 30 more matching items.]```
NEW

Right now it appears to be a lot more accurate in general due to better synonym and category match scoring.

Bleak was matched due to lovelorn being a match and them sharing a category.
#

OLD

--- Lich: speechfinder active.
[speechfinder: 
  =commiserate      (Category: Soothe/Comment | Sad/Demoralized)
                    Definition: express sympathy, compassion, or pity for someone; share in another's sorrow or suffering. Synonyms: sympathize, console, empathize.]
[speechfinder: 
  =interrogate      (Category: Rude/Impolite | Angry | Militaristic)
                    Definition: ask questions of someone closely, aggressively, or formally; examine or cross-examine. Synonyms: question, grill, examine.]
[speechfinder: 
  =ridicule         (Category: Rude/Impolite | Angry | Academic/Sermonic)
                    Definition: subject someone or something to contemptuous and dismissive language or behavior; mock or deride. Synonyms: mock, deride, scorn.]
[speechfinder: 
  =upbraid          (Category: Rude/Impolite | Angry | Militaristic)
                    Definition: find fault with someone; scold or criticize sharply; reproach or chastise. Synonyms: reprimand, scold, chastise.]
[speechfinder: 
  =urge             (Category: Confused/Querulous | Excited/Interested | Academic/Sermonic)
                    Definition: try earnestly or persistently to persuade someone to do something; press or encourage strongly. Synonyms: exhort, push, implore, coax.]
[speechfinder: 
  =toast            (Category: Soothe/Comment | Polite | Happy/Amused)
                    Definition: propose or drink to the health, success, or honor of someone or something; celebrate with a drink. Synonyms: salute, celebrate, honor.]
[speechfinder: 
  =recount          (Category: Soothe/Comment | Academic/Sermonic | Debate)
                    Definition: tell someone about an experience or event in detail; narrate or describe past occurrences. Synonyms: describe, relate, narrate.]
[speechfinder: 
  :pitying          (Category: Unhappy | Rude/Impolite | Friendly/Polite | Uncomfortable)
                    Definition: speaking in a manner that shows sympathy, compassion, or condescension toward someone perceived as unfortunate. Synonyms: sympathetic, compassionate,
                    condescending.]
[speechfinder: 
  =echo             (Category: Soothe/Comment | Angry | Confused/Querulous | Excited/Interested | Sad/Demoralized)
                    Definition: repeat or mirror someone else's words, actions, or opinions; reflect or resound with a similar idea. Synonyms: repeat, mirror, imitate.]
[speechfinder: 
  :lovelorn         (Category: Unhappy | Uncomfortable | Baffled/Worried)
                    Definition: speaking in a manner that shows sadness or disappointment due to unrequited love. Synonyms: heartbroken, forlorn, disappointed.]
[speechfinder: 
Displaying the top 10 most relevant results. There are 80 more matching items.]```
OLD

This is all over the place.
molten ivy
#
--- Lich: test active.
[test: Search terms: accusingly, accusingly]
[test: Terms (stems): accus, accus]
[test: 
  =carp             (Category: accusation & blame)
                    Definition: to complain or find fault in a petty or nagging way.
                    Synonyms: nag, criticize, grumble]
[test: 
  :pointed          (Category: accusation & blame)
                    Definition: clearly directed or aimed, often in a critical or accusatory manner.
                    Synonyms: sharp, critical, direct, cutting]
[test: 
  :reproachful      (Category: accusation & blame)
                    Definition: expressing disapproval or disappointment in someone's actions or behavior.
                    Synonyms: disapproving, critical, judgmental, condemning]
[test: 
  =admonish         (Category: accusation & blame)
                    Definition: to warn or reprimand someone firmly, indicating disapproval or fault.
                    Synonyms: reprimand, warn, censure]
[test: 
  :disapproving     (Category: accusation & blame)
                    Definition: expressing an unfavorable opinion or disapproval towards someone or something.
                    Synonyms: critical, judgmental, scolding, censorious]
[test: 
  :scolding         (Category: accusation & blame)
                    Definition: expressing sharp, stern disapproval or reprimand, often in a harsh or angry manner.
                    Synonyms: rebuking, reproaching, chiding]
[test: 
  :reproving        (Category: accusation & blame)
                    Definition: conveying a mild scolding or criticism, often to express disapproval of someone's actions.
                    Synonyms: rebuking, chiding, admonishing, censuring]
[test: 
  =allege           (Category: accusation & blame)
                    Definition: to claim or assert something without providing proof, often implying suspicion.
                    Synonyms: claim, assert, accuse]
[test: 
  :accusing         (Category: accusation & blame)
                    Definition: assigning fault or responsibility to someone, often in a confrontational or critical manner.
                    Synonyms: blaming, condemning, challenging, reproaching]
[test: 
  =accuse           (Category: accusation & blame)
                    Definition: to charge someone with a fault, offense, or crime, often implying blame or responsibility.
                    Synonyms: allege, implicate, charge]
[test: 
Displaying the top 10 most relevant results. There are 2 more matching items.]```

The word stemming is a lot more robust now too.
#
def custom_stem(word)
  word = word.downcase.strip
  modified = false

  # Check for irregular words in the exceptions dictionary
  return IRREGULAR_WORDS[word] if IRREGULAR_WORDS.key?(word)

  # Optional: Remove accents (if dealing with accented text)
  word = word.unicode_normalize(:nfkd).encode('ASCII', replace: '') if word.ascii_only? == false

  # Custom rules for specific suffixes (longer ones first to avoid conflicts)
  if word.end_with?('ational')
    word.gsub!(/ational$/, 'ate')
    modified = true
  elsif word.end_with?('iveness')
    word.gsub!(/iveness$/, 'ive')
    modified = true
  elsif word.end_with?('fulness')
    word.gsub!(/fulness$/, 'ful')
    modified = true
  elsif word.end_with?('ousness')
    word.gsub!(/ousness$/, 'ous')
    modified = true
  elsif word.end_with?('ness')
    word.gsub!(/ness$/, '')
    modified = true
  elsif word.end_with?('izations')
    word.gsub!(/izations$/, 'ize')
    modified = true
  elsif word.end_with?('ization')
    word.gsub!(/ization$/, 'ize')
    modified = true
  elsif word.end_with?('ability')
    word.gsub!(/ability$/, 'able')
    modified = true
  elsif word.end_with?('ibility')
    word.gsub!(/ibility$/, 'ible')
    modified = true
  elsif word.end_with?('tional')
    word.gsub!(/tional$/, 'tion')
    modified = true
  elsif word.end_with?('ation')
    word.gsub!(/ation$/, 'ate')
    modified = true
  elsif word.end_with?('ator')
    word.gsub!(/ator$/, 'ate')
    modified = true
  elsif word.end_with?('alism')
    word.gsub!(/alism$/, 'al')
    modified = true
  elsif word.end_with?('aliti')
    word.gsub!(/aliti$/, 'al')
    modified = true
  elsif word.end_with?('ical')
    word.gsub!(/ical$/, 'ic')
    modified = true
  elsif word.end_with?('ance')
    word.gsub!(/ance$/, '')
    modified = true
  elsif word.end_with?('ence')
    word.gsub!(/ence$/, '')
    modified = true
  elsif word.end_with?('ment')
    word.gsub!(/ment$/, '')
    modified = true
  elsif word.end_with?('ship')
    word.gsub!(/ship$/, '')
    modified = true
  elsif word.end_with?('less')
    word.gsub!(/less$/, '')
    modified = true
  elsif word.end_with?('ably')
    word.gsub!(/ably$/, 'able')
    modified = true
  elsif word.end_with?('ibly')
    word.gsub!(/ibly$/, 'ible')
    modified = true
  elsif word.end_with?('ly')
    word.gsub!(/ly$/, '')
    modified = true
  elsif word.end_with?('ous')
    word.gsub!(/ous$/, '')
    modified = true
  elsif word.end_with?('ive')
    word.gsub!(/ive$/, '')
    modified = true
  elsif word.end_with?('ize')
    word.gsub!(/ize$/, '')
    modified = true
  elsif word.end_with?('ise')
    word.gsub!(/ise$/, '')
    modified = true
  elsif word.end_with?('ing') && !word.end_with?('sing') && !word.end_with?('cing')  # Restrict "ing" rule to avoid stripping "s"
    word.gsub!(/ing$/, '')
    modified = true
  elsif word.end_with?('ed') && !word.end_with?('sed')
    word.gsub!(/ed$/, '')
    modified = true
  end

  # Only handle the "s" suffix if no prior modifications have been made
  if !modified
    if word.end_with?('ies')
      word.gsub!(/ies$/, 'y')  # e.g., "cities" -> "city"
    elsif word.end_with?('es')
      word.gsub!(/es$/, '')  # e.g., "boxes" -> "box"
    elsif word.end_with?('s') && !word.end_with?('ss') && word.length > 3
      word.gsub!(/s$/, '')  # Handle simple plural forms but ignore short words or words like "grass"
    end
  end

  # Skip the fast-stemmer if the word ends in a vowel and hasn't been modified
  return word if !modified && word.match?(/[aeiou]$/)

  # Fallback to fast stemmer for remaining cases
  word = word.stem

  # Avoid reducing to a single letter unless the word is inherently a single letter
  return word.length > 1 ? word : word[0]

  return word
end

This ensures that words with suffixes are matched with the suffix and also with the root word.

#

Would appreciate anyone testing out basically speechfinder 2.0

Just need to download these 2 files and place in scripts folder as usual.

The verb list is only entered up to coo.

molten ivy
#
--- Lich: test active.
[test: Search terms: love, has, nothing, with, what, you, are, expecting, get, only, with, what, you, are, expecting, give, which, everything, love, has, nothing, with, what, you, are, expecting, get, only, with, what, you, are, expecting, give, which, everything]
[test: Terms (stems): love, ha, noth, with, what, you, are, expect, get, on, with, what, you, are, expect, g, which, everyth, love, ha, noth, with, what, you, are, expect, get, on, with, what, you, are, expect, g, which, everyth]
[test: 
  =boast            (Category: arrogance & domination)
                    Definition: to talk with excessive pride and self-satisfaction about one's achievements, possessions, or abilities.]
[test: 
  :wishful          (Category: excitement & anticipation)
                    Definition: filled with eager longing or hope for future events, often expressing a desire for something positive to occur.]
[test: 
  :sorrowful        (Category: sadness & melancholy)
                    Definition: deeply sad and filled with grief, often reflecting feelings of loss or regret.]
[test: 
  :impulsive        (Category: compulsion & lack of control)
                    Definition: acting without forethought or consideration, often resulting in hasty or unpredictable actions.]
[test: 
  :impatient        (Category: impatience & frustration)
                    Definition: showing a lack of patience; feeling annoyed or restless due to delay or obstacles.]
[test: 
  :distant          (Category: isolation & loneliness)
                    Definition: emotionally or physically detached; showing a lack of closeness or warmth.]
[test: 
  :withering        (Category: arrogance & domination)
                    Definition: expressing disdain or contempt, often intended to belittle or humiliate others.]
[test: 
  :hurried          (Category: urgency & demand)
                    Definition: acting with excessive speed or urgency, often leading to a sense of rush or pressure.]
[test: 
  :lovelorn         (Category: sadness & melancholy)
                    Definition: experiencing feelings of love and longing, often accompanied by sadness or heartache.]
[test: 
  :hasty            (Category: impatience & frustration)
                    Definition: acting or done with excessive speed or urgency; showing a lack of consideration.]
[test: 
Displaying the top 10 most relevant results. There are 714 more matching items.]
--- Lich: test has exited.```
Love has nothing to do with what you are expecting to get–only with what you are expecting to give–which is everything

I think it did a pretty good job with this quote and provides some good matches such as lovelorn, distant, wishful, or sorrowful
#
--- Lich: test active.
[test: Search terms: curious, thought, but, only, when, you, see, people, looking, ridiculous, that, you, realize, just, how, much, you, love, them, curious, thought, but, only, when, you, see, people, looking, ridiculous, that, you, realize, just, how, much, you, love, them]
[test: Terms (stems): curi, thought, but, on, when, you, see, people, look, ridicul, that, you, real, just, how, much, you, love, them, curi, thought, but, on, when, you, see, people, look, ridicul, that, you, real, just, how, much, you, love, them]
[test: 
  :thoughtful       (Category: empathy & understanding)
                    Definition: considerate and reflective, often showing care and concern for others' feelings or situations.]
[test: 
  :introspective    (Category: reflection & contemplation)
                    Definition: characterized by self-examination and reflection on one's thoughts and feelings.]
[test: 
  :wondering        (Category: curiosity & exploration)
                    Definition: characterized by curiosity or a desire to understand, often expressing a sense of inquiry.]
[test: 
  :curious          (Category: curiosity & exploration)
                    Definition: eager to know or learn something; showing interest or inquisitiveness.]
[test: 
  :musing           (Category: reflection & contemplation)
                    Definition: engaged in deep or reflective thought; often characterized by a calm and introspective demeanor.]
[test: 
  :contemplative    (Category: reflection & contemplation)
                    Definition: expressing or involving prolonged thought; reflective and thoughtful.]
[test: 
  :reflective       (Category: reflection & contemplation)
                    Definition: engaged in deep thought or introspection; contemplative and thoughtful.]
[test: 
  :pensive          (Category: reflection & contemplation)
                    Definition: engaged in deep or serious thought, often with a hint of sadness or wistfulness.]
[test: 
  :inquisitive      (Category: curiosity & exploration)
                    Definition: eager for knowledge; curious and inclined to ask questions.]
[test: 
  :lovelorn         (Category: sadness & melancholy)
                    Definition: experiencing feelings of love and longing, often accompanied by sadness or heartache.]
[test: 
Displaying the top 10 most relevant results. There are 542 more matching items.]
--- Lich: test has exited.```

It is a curious thought, but it is only when you see people looking ridiculous that you realize just how much you love them
#

There are 4 attempts to find matches based on what you type exactly and then 4 attempts to search for the root words of what you type. Ruby is a bit limited on breaking down words to their root but it’s not terrible.

I need to create a list of words that are roots but could be mistakenly stemmed

molten ivy
#

STOP_WORDS = [
'a', 'about', 'above', 'after', 'again', 'against', 'all', 'am', 'an', 'and', 'any', 'are', 'aren’t', 'as', 'at',
'be', 'because', 'been', 'before', 'being', 'below', 'beside', 'between', 'both', 'but', 'by', 'can', 'can’t', 'cannot', 'could', 'couldn’t',
'did', 'didn’t', 'do', 'does', 'doesn’t', 'doing', 'don’t', 'down', 'during', 'each', 'either', 'even', 'everyone', 'everybody', 'few', 'for',
'from', 'further', 'get', 'had', 'hadn’t', 'has', 'hasn’t', 'have', 'haven’t', 'having', 'he', 'he’d', 'he’ll', 'he’s', 'her', 'here', 'here’s',
'hers', 'herself', 'him', 'himself', 'his', 'how', 'how’s', 'i', 'i’d', 'i’ll', 'i’m', 'i’ve', 'if', 'in', 'into', 'is', 'isn’t', 'it', 'it’s', 'its',
'itself', 'just', 'let’s', 'may', 'me', 'more', 'most', 'much', 'must', 'mustn’t', 'my', 'myself', 'near', 'never', 'no', 'nor', 'not', 'nobody',
'of', 'off', 'on', 'once', 'one', 'only', 'or', 'other', 'others', 'ought', 'our', 'ours', 'ourselves', 'out', 'over', 'own', 'same', 'shall', 'shan’t',
'she', 'she’d', 'she’ll', 'she’s', 'should', 'shouldn’t', 'so', 'some', 'someone', 'sometimes', 'still', 'such', 'than', 'that', 'that’s', 'the', 'their',
'theirs', 'them', 'themselves', 'then', 'there', 'there’s', 'these', 'they', 'they’d', 'they’ll', 'they’re', 'they’ve', 'this', 'those', 'though', 'through',
'throughout', 'to', 'too', 'under', 'unless', 'until', 'up', 'upon', 'very', 'was', 'wasn’t', 'we', 'we’d', 'we’ll', 'we’re', 'we’ve', 'were', 'weren’t',
'what', 'what’s', 'when', 'when’s', 'where', 'where’s', 'which', 'while', 'who', 'who’s', 'whom', 'why', 'why’s', 'with', 'within', 'won’t', 'would', 'wouldn’t',
'yet', 'you', 'you’d', 'you’ll', 'you’re', 'you’ve', 'your', 'yours', 'yourself', 'yourselves'
]

Also needed to create a list of words to simply ignore.

molten ivy
#

This is the vocabulary script that just runs in the background and offers synonyms or other tones and verbs to use based on your tones or verbs or will offer suggestions based on what you say

#

You say, "I wonder if anyone else will visit the hinterwilds this evening."

  :hateful          (Category: dislike & hate)
                    Definition: feeling or showing intense dislike or ill will.]
[1test: 
  :fascinated       (Category: engagement & interest)
                    Definition: intensely captivated or absorbed by something; showing keen interest or wonder.]
[1test: 
  :even             (Category: calmness & serenity)
                    Definition: showing a steady and consistent manner; calm and balanced.]
[1test: 
  :submissive       (Category: submissiveness & compliance)
                    Definition: yielding to the authority or will of others, often characterized by a lack of assertiveness.]
[1test: 
  =cackle           (Category: mockery & irony)
                    Definition: to laugh in a harsh, high-pitched manner, often conveying a sense of mockery or glee at someone else's expense.]
[1test: 
  :covetous         (Category: jealousy & envy)
                    Definition: having or showing a great desire to possess something belonging to someone else; envious.]
[1test: 
  :sublime          (Category: surprise & wonder)
                    Definition: inspiring awe or admiration due to its beauty, grandeur, or excellence, often evoking a sense of wonder.]
[1test: 
  :wondering        (Category: curiosity & exploration)
                    Definition: characterized by curiosity or a desire to understand, often expressing a sense of inquiry.]
[1test: 
  =marvel           (Category: surprise & wonder)
                    Definition: to express amazement or admiration, often reflecting awe or astonishment.]
[1test: 
  :amazed           (Category: surprise & wonder)
                    Definition: greatly surprised or filled with wonder and astonishment.]```
Say is going to be all over the place

You remark, "Everyone dies dear."
```[1test: 
  =joke             (Category: playfulness & humor)
                    Definition: to make a humorous or playful remark, often to provoke laughter or lighten the mood.]
[1test: 
  =mention          (Category: engagement & interest)
                    Definition: to refer to or speak briefly about something, often as a casual remark.]
[1test: 
  =interject        (Category: engagement & interest)
                    Definition: to insert a comment or remark abruptly into a conversation, often to express a viewpoint or add information.]
[1test: 
  =note             (Category: engagement & interest)
                    Definition: to mention or observe something, often highlighting its importance or relevance.]
[1test: 
  =comment          (Category: engagement & interest)
                    Definition: to make a remark, observation, or express an opinion, often as part of a casual conversation.]
[1test: 
  =observe          (Category: reflection & contemplation)
                    Definition: to notice or remark upon something, often providing insight or commentary.]```

So again the best use case for this one, imo, is to just help you expand your vocabulary as it relates to tones and speech verbs to avoid using the same ones over and over
molten ivy
#

Got it working with commands
;send verbs
;send tones
;send both
;send nodefinitions
;send showdefinitions
;send matches=#

molten ivy
#

Completed all tones and verbs from in game output for tones and speech verbs. Final category list with number per category.

karmic oyster
#

Hi Ruse! I was trying to run ;1test.lic but it doesn't seem to be intercepting my speech properly when directed at someone. Here's what I see when speaking:

Speaking curiously to XXXXX, you query, "How are you today?"```

And then when whispering:
```>whisper XXXXX How are you today?
You quietly whisper to XXXXX, "How are you today?"
>
[1test: Detected speech pattern: quietly whisper to XXXXX - "How are you today"]
[1test: Search terms: quietly, whisper, XXXXX]
[1test: Terms (stems): quiet, whisper, XXXXX]
[1test: Display verbs: true, Display tones: true]
[1test: Top suggestions for 'quietly whisper to XXXXX' or 'How are you today':]```
#

Further feedback: Could we control the output so this is pushed to a separate window outside the story? It would allow for ongoing feedback from the script without interrupting the flow in the main window.

molten ivy
#

Kind of forgot you could use tones and verbs together

molten ivy
# karmic oyster Hi Ruse! I was trying to run `;1test.lic` but it doesn't seem to be intercepting...
You quietly whisper to Kaight, "How are you doing today?"
>
[1test: Detected speech pattern: quietly whisper to kaight - "how are you doing today"]
[1test: Search terms: quietly, whisper, kaight]
[1test: Terms (stems): quiet, whisper, kaight]
[1test: Display verbs: true, Display tones: true]
[1test: Top suggestions for 'quietly whisper to kaight' or 'how are you doing today':]
[1test: =hush                 (Ranked #10)]
[1test: =coo                  (Ranked #9)]
[1test: =breathe              (Ranked #8)]
[1test: =gossip               (Ranked #7)]
[1test: =hiss                 (Ranked #6)]
[1test: =mouth                (Ranked #5)]
[1test: =murmur               (Ranked #4)]
[1test: =mutter               (Ranked #3)]
[1test: =wheeze               (Ranked #2)]
[1test: =whisper              (Ranked #1)]
>':curious =query @XXXXX How are you today?
You curiously query, "How are you today?"
>
[1test: Detected speech pattern: curiously query - "how are you today"]
[1test: Search terms: curiously, query]
[1test: Terms (stems): curiou, query]
[1test: Display verbs: true, Display tones: true]
[1test: Top suggestions for 'curiously query' or 'how are you today':]
[1test: :interested           (Ranked #6)]
[1test: :wondering            (Ranked #5)]
[1test: :inquisitive          (Ranked #4)]
[1test: :curious              (Ranked #3)]
[1test: =ask                  (Ranked #2)]
[1test: =query                (Ranked #1)]```
molten ivy
karmic oyster
#

It probably shouldn't capture the "quietly whisper" part, since you have no control over the way a whisper is delivered, right?

molten ivy
#

Oh, you want it to ignore whispers?

karmic oyster
#

I noticed it also captured the response from the teller when depositing coins, but I forgot to snag that. Moment...
I was just thinking that it can give you feedback on whispers or on this pasted below, but there's no reasonable way to apply that feedback since you can't control those types of speech.

You have no acceptable notes to deposit here.
You deposit 100 silvers into your account.  The teller carefully records the transaction and says, "Thank you, Saesyra.  This brings your total to 2,401,858 silvers.  Have a nice day!"

>
[1test: Detected speech pattern: deposit 100 silvers into your account The teller carefully records the transaction and says - "Thank you Saesyra This brings your total to 2 401 858 silvers Have a nice day"]
[1test: Search terms: deposit, 100, silvers, into, your, account, the, teller, carefully, records, the, transaction, and, says]
[1test: Terms (stems): deposit, 100, silver, into, your, account, the, teller, care, record, the, transact, and, sai]
[1test: Display verbs: true, Display tones: true]
[1test: Top suggestions for 'deposit 100 silvers into your account The teller carefully records the transaction and says' or 'Thank you Saesyra This brings your total to 2 401 858 silvers Have a nice day':]
[1test: 
  =chant            (Category: sound & auditory)
                    Definition: to speak or sing in a rhythmic, repetitive manner, often to emphasize a point or create a particular atmosphere.]
[1test: 
  :drunken          (Category: compulsion & lack of control)
                    Definition: characterized by a state of intoxication, often leading to impaired judgment or behavior.]
[1test: 
  =intone           (Category: sound & auditory)
                    Definition: to speak or chant in a steady, rhythmic, or monotonous tone, often conveying solemnity or formality.]
[1test: 
  :intoxicated      (Category: compulsion & lack of control)
                    Definition: under the influence of alcohol or drugs; exhibiting impaired judgment or behavior.]
[1test: 
  :theatrical       (Category: dramatic & intense)
                    Definition: exaggerated and expressive in behavior or speech, often intended to attract attention or evoke strong emotions.]```
#

But .. maybe my feedback isn't useful (for whispers) because on reflection, I [know] the script is really about advising you on potential ways to speak. if you whisper a phrase, it's still providing feedback based on what you say. So the tool fulfills its purpose whether you're whispering or not.

molten ivy
#

We could make the quietly whisper like say and ignore it. It makes sense. I'll have to think on how to ignore NPCs

karmic oyster
#

the one that's more interesting to me is the potential of pushing this to another window!

molten ivy
#

Ok, give it a whirl. Took awhile to work out the kinks but I think I captured all the potential variations of speech.

No verb or tone and no target, search for spoken text only.

Speaking to Kaight, you say, "Hi."
No verb or tone but a target, search for spoken text only.

Speaking accusingly to Kaight, you say, "Hi."
No verb, a tone, and target, search using the tone and spoken text.

Speaking to Kaight, you accuse, "Hi."
No tone, a verb, and target, search using the tone and spoken text.

Speaking accusingly to Kaight, you accuse, "Hi."
A tone, a verb, and target, search using the tone and spoken text.

You quietly whisper to Kaight, "H."
Whisper, no tone, no verb, search using spoken text only.

You accusingly say, "Hi."
A tone, no verb, no target, search using spoken text only.

You accuse, "Hi."
No tone, a verb, no target, search using spoken text only.

You accusingly accuse, "Hi."
A tone, A verb, no target, search using spoken text only.```

I still don't have a fix for npc's that match though.
#

Main window above speech window

karmic oyster
#
--- Lich: 1test active.
--- Lich: error: uninitialized constant VocabularyWindow
    1test:106:in `_script'
    C:/Users/XXXXX/Desktop/Lich5/lib/script.rb:109:in `eval'
--- Lich: 1test has exited.```
I commented out this piece and the script worked:
```# Open the vocabulary window at the start
VocabularyWindow.window```
molten ivy
#

Woops, yeah that should have been deleted

#

This version switches up the scoring a bit for synonyms to be weighted far more. If your goal is to use different tones and verbs this will work better

#

Forgot a regex match for ask to filter out ask as well.

#

TEST2
More emphasis on matching synonyms.

karmic oyster
#

Excellent, I'll play with this some more!

Is there a way to send a phrase to get this feedback without actually speaking out loud to the game?

molten ivy
#

Good idea, I'll see if I can add a ;send to do that

molten ivy
#

Today has been a bit of whac a mole. Had an issue with targeted speech but I think I fixed it

molten ivy
#
  # Load player preferences
  prefs = load_player_preferences

  # Initialize variables for tone, verb, target, and spoken text
  tone = nil
  verb = nil
  target = nil
  spoken_text = nil

  # Match different patterns separately
  return if line =~ /the teller/i
  # Pattern 1: "You say, '...'"
  if line =~ /^You say\, \"(?<text>.+)\"/
    spoken_text = $~[:text]```


  return if line =~ /the teller/i

If you add this in to the script where it is above that will take care of ignoring all the bank tellers