how can i use openai's gpt 3 to find alternate spellings of bad words? - openai-api

so, i am making an auto mod discord bot that finds alternate spellings of bad words. i tried using regex to find them but found many many false positives. so i thought about using openai's gpt-3 to do so, as i saw a screenshot of someone using it for what appears to be finding alternate spellings.
the screenshot:
unfortunately, i don't know how exactly they made gpt-3 do this, and how something like this can be used in an application like a discord bot.
can someone please tell me how you can use gpt-3 to find alternate spellings of words?
any help would be appreciated! thank you!

I am not sure if you are looking for prompt/settings. However, based on my experience (3-4 months) I would use a few-shot approach prompt such this one:
Check spelling and return the corrected word:
Word: nawty
Returns: naughty
Word: rigt
Returns: right
Word: stakoverflow
Returns:
I guess that a high temperature and no penalties will do a good job. Also, keep trying different engines and see how it behaves. Curie-instruct-beta should do it.

Related

GPT-3: a medical analogue

Is there an analogue of this
which would answer like an excellent doctor ?
Or Einstein, or Ancient Greek ? At which URL can I find the list of all of these possibilities ?
I have just discovered GPT-3 and I'm amazed with it.
You can either finetune an already trained transformer model or just give GPT-3 a more accurate prompt.
If you changed your prompt by changing the text below in playground to something like:
The following is a conversation with an ancient greek professor. The professor is helpful, wise, clever, and very philosophical.
Human: Who are you?
Greek Philosopher: I am Temistocles of Milos, or at least that is who my senses have made me believe I am.
Human: What do you think about the nature of reality? Are we bound under the gods will?
Greek Philosopher:
You might get something more of your liking, you should also change the stop sequences to fit your prompt ("Human" and "Greek Philosopher" on this example). Read on making prompts for GPT-3 to go into a better direction.

How to create a custom list of words for predictive text

I am thinking about making an app to do with electrical equipment and I would like the app to recognise the name of tools as you write to save you time (predictive text). How would I go about creating a custom list of words the app recognises. Can anyone please point me in the right direction. I have looked around and not found much information on the subject. I am currently using objective c although learning swift so any of those languages will do. Many thanks.
What you want is not predictive text but rather autocomplete.
See this post, there's an answer by Jano with a link to code that seems to do what you need.

define pronunciation starting time for each word in script

I have a text script that is used to create podcasts. So the words in podcast audio are exactly the same as in my text. Now what I want to have is the following:
Word in text | Pronounciation started at
Hello 0:0:0.000
my 0:0:1.125
friends 0:0:2.750
Is that possible to do at all?
Thanks in advance!
One of the key words you could start with to approach the complexity of the problem is "forced alignment". This site also covers questions regarding this topic e.g. here which leads you to questions and answers concerning HTK (the Hidden Markov Model Toolkit) via the releated threads.
You can find a more hands-on style description of how to use forced alignment in automated audio segmentation here.
So the answer is: yes, it is possible, but it is algorithmically very complex and even in its best implementations it is not error-free.
PS.: I found you a really simple tool

How does OCR work? and how to add OCR to an alphabet

I have an alphabet which has not been tackled before, so when scanned, there's no way to detect the letters for recognition with OCR. I'm trying to program OCR for it, but don't have much experience in this. I'd appreciate some hints as to where to get started, and how such a system is normally implemented.
Take a look at this page--it describes the training process for an open source OCR engine.
The free Stanford Online Machine Learning class has a great set of lessons on Photo OCR in Part XVIII.
This blog post has a brief description of the example taught in the class.
There are some excellent resources at google books. Likewise, if you search for Optical Character Recognition on Amazon, there are some pretty up-to-date books that look to be fairly thick and intellectually challenging :D heh
btw - I'm well aware this post has some age, but you never know when some other person might stumble across this and find just what they need. And if this even has the chance of helping out, then so be it. OCR is such a strange subject, that there's not too much out there that can really really answer the deep-machine ended questions. Especially if you're going to attempt to write your own library. :P

How do you correct repetitive typing mistakes?

I find myself making repetitive mistakes typing keywords and sentences in my code comments. I notice its getting worse since my fingers just keep "practicing" incorrect words.
Is there any solution to this? Like a typing tutor designed to help correct repetitive mistakes?
The only way to correct this is to retrain your muscle memory. If it's important enough to take the time, the only way to retrain muscle memory is repetition.
For example, I tend to spell the word "the" as "teh" because of the same scenario you're asking about. To retrain the memory I would just spell the word over and over, starting slowly, striving for 100% accuracy, and increasing the speed. It's the same technique I use to get better at Guitar Hero.
Try a different keyboard layout. That way you start from scratch and completely retrain your fingers. Done properly you should be able to type just as fast as you could with qwerty in a few weeks. For example Dvorak.
</shameless promotion of dvorak>
If this were SMBC, the alt-text drawing thingy would be a giraffe hooker fluttering her eyelashes.
Try texter from one of LH's editors.
Maybe a book? Mastering Computer Typing: A Painless Course for Beginners and Professionals I hadn't read that, but in amazon has good reviews
One of the best websites to avoid repetitive mistakes is http://www.keybr.com/
It will actually keep track of the letters with which you are making more mistakes and generates typing lessons accordingly.
I would recommend practice on TouchTyping.guru - you can choose there the test with most popular words, so you'll quickly improve your general performance - making a mistake will make this app to generate next words with the letter you were wrong with.
And if you have problems with given letters you can try learning there putting restriction to the number of letters used to form the words. It puts focus on the last letter you choose, and they are also ordered by frequency of occurence in given language.

Resources