Wednesday, April 23, 2014

Quick Note

I've been doing extensive editing to the dictionary. I inherited a lexicon that was ostensibly tagged by a third party and utilized it in Infinite Monkeys 3. This lexicon is tagged abominably and I realize that it makes im3's template system more difficult to work with and the output shoddier. I apologize (personally) for this. Please be aware that I'm working daily to resolve this issue.

Editing a lexicon with 85000 words is tedious, difficult, and potentially harmful to the well-being of myself and those around me. Nonetheless it must be done.

Thank you for your patience.


!~JYNX~!


im3.1.2

Bugfix to "Correct" / POS Tagging
Edits to master.dictionary.txt

Monday, April 21, 2014

im3.1.1 Now available

im3.1.1

Several mistakes corrected. Optimized tag routine (now 12x faster.. literally). Please note that any edits to old versions of the MASTER dictionary must be discarded. Optimization works with an alphabetized dictionary and I have not yet added any routine within im3 to sort. I will in future updates add an enhanced dictionary editor which allows additions to be made. In the meantime, no edits to master.dictionary.txt!

-jYnx

Thursday, April 17, 2014

im3.1.0

#1. tweaks to dictionary to remove redundant entries
#2. added stylebuffer to SMUP.exe & im3 SMUP tab (see pic)


Wednesday, April 16, 2014

Attatching endings to words, with SMUP

(w1#(NN)) (w1#(w1 & "ing")) (eval(w1)) 

This tiny piece of code shows you how you can turn a NOUN (NN) into a GERUND (VBG).

The first line: (w1#(NN))

w1 is our variable. We assign with the # operator. NN is the function which generates a random noun from the dictionary.

Then we reassign w1 = w1 + "ing" which in SMUP is..

(w1#(w1 & "ing"))

POST Trainer Demo

Sunday, April 13, 2014

im3.0.1: BUG FIX

Fixed a glitch where changes to dictionary were over-written on save.

Haiku With im3 (part 1)


(::HAIKU::)

(::LINE_1::)
    (nSyllables#5)
    (w1#(rndWord("JJ","","",2)))
    (w2#(rndWord("NN","","",1)))
    (w3#(rndWord("VBZ","","",2)))
    (eval(w1)) (eval(w2)) (eval(w3))
(::END_LINE_1::)

(::LINE_2::)
    (nSyllables#7)
    (newline)
    (w1#(rndWord("JJ","","",2)))
    (w2#(rndWord("NNS","","",3)))
    (w3#(rndWord("IN","","",1)))
    (w4#(rndWord("NN","","",1)))
    (eval(w1)) (eval(w2)) (eval(w3)) (eval(w4))
(::END_LINE_2::)

(::LINE_3::)
    (nSyllables#5)
    (newline)
    (w1#(rndWord("VBZ","","",2)))
    (w2#(rndWord("DT","","",1)))
    (w3#(rndWord("NNS","","",2)))
    (eval(w1)) (eval(w2)) (eval(w3))
(::END_LINE_3::)

Saturday, April 12, 2014

Video Tute! Diddling with the Dictionary~

Scripting with im3: Parsing a list...

(scriptStr#"DT NN NN VBZ DT JJ NN")
(splitOver(scriptStr, " ",scriptList))
(nWords#(len(scriptList)))
(c#0)

(::LOOP::)
    (inScr#(toString(scriptList[c])))
    (inTxt#(rndWord(inScr,"","anywhere",0)))
    (find(inWord,inTxt))
    (inPhone#(phoneTag(inWord)))
    (inPhone#(left(inPhone,4)))
    (rndWord(inScr,inPhone,"anywhere",0))
    ((Inc(c,1)))
    (if(c=nWords)) { (goto(::UNLOOP::)) }
    (goto(::LOOP::))
(::UNLOOP::)





Let's take a run through of this im3 script, since it is doing something fairly complicated. First, we define a string which has several part of speech tags in it. We take this string, and using the splitOver routine, separate the words into a list, every time we hit a space. We then use the (len(list)) command to determine how many individual words are in the list. We create a variable called c which will act as a counter.

(scriptStr#"DT NN NN VBZ DT JJ NN")
(splitOver(scriptStr, " ",scriptList))
(nWords#(len(scriptList)))
(c#0)


Then we define a label, (::LOOP::).

(::LOOP::)

We create a string to read in the first element in our list scriptList, and hold it's contents in the variable inScr.

(inScr#(toString(scriptList[c])))

We create another variable called inTxt which holds the contents of a randomly generated word with the first part of speech in the list scriptList. inTxt now holds a random word of the first part of speech read in from scriptStr; in this case DT, a determiner.

(inTxt#(rndWord(inScr,"","anywhere",0)))

We use the find to command to look up inTxt and save the word's record to inWord.

(find(inWord,inTxt))

We create another string to hold the phonetic data.

    (inPhone#(phoneTag(inWord)))
    (inPhone#(left(inPhone,4)))


And we call LEFT to cut 4 characters from the left hand side of the variable inPhone. So left("1234567890", 2) would = "12".

Then we generate another random word with the new phonetic data:

    (rndWord(inScr,inPhone,"anywhere",0))

And we increment our counter:

    ((Inc(c,1)))

Note the double brackets. This prevents SMUP from returning data to our output window. It Eats data that is double brackets. Try running this code without the double brackets!

    (if(c=nWords)) { (goto(::UNLOOP::)) }
    (goto(::LOOP::))
(::UNLOOP::)


Here we have our exit condition. If our counter is equal to the number of words in our list, then we go to (::UNLOOP::) or else we just go back to (::LOOP::).

And there you have it.

Try copying this into SMUP and giving it a run.


im3 Ready for Download!

DOWNLOAD

You can report any bugs, issues to dtolkacz@gmail.com

We are live! YAY!

Friday, April 11, 2014

Infinite Monkeys 3: Wise Monkeys Edition

I am within a couple days of the first release of im3, and unlike im2, im3 has a fairly steep, front loaded learning curve. The advantage of course, is that it is a million times better than its predecessor. In contrast, im3 will have:

  • Part of Speech tagging! Annoyed by having to translate poems into parts of speech? Me too. im3 will give it go at doing it for you. Accuracy-wise, it is hovering at about 85-90%. But it's a learning AI, so the more times you use the training module and correct its mistakes, the better im3 will get at tagging parts of speech. This will make generating from a template a million times faster and better.
  • A scripting language! im3 comes with SMUP scripting language which allows you to save generated text to variables and call them redundantly. It allows you to make function calls and generate words from parts of speech, pronunciation keys, or the number of syllables. This will make generating metered verse possible.
  • Vastly improved dictionary interface. The new dictionary interface operates off a master dictionary which will allow you to copy words in bulk, & search by text, part of speech, or phoneme. You can of course load and save dictionaries, and set which dictionary a template generates from. The master dictionary contains around 130,000 words and can hold as many as 200,000.
  • Improved n-gram biasing. It will be much easier to load and save n-gram biases due to improvements on the way IM saves n-gram information. Load times have been vastly reduced and optimizations have been made to the EAT function which makes eating in text less time consuming.
  • im3 still includes an option to speak back the poem in a computer voice, but this time, you will be able to control the rate at which the computer reads back the poem.
  • HTML docs included and can be referenced from im3's GUI.
  • Video tutorials by yours truly will help shorten the learning curve. 

What's missing?

  • Semantic tagging. This will be introduced in later updates, but for right now, you can make your own dictionaries any way you please.
  • im3 uses Carnegie Melon's pronouncing dictionary, which is superior to im2's. 
End of list.

Release should be live within the next couple of days.  This is a pleasant demonstration of a very early incarnation of im3. Enjoy, & be well.