Reading through the concept and execution of N-Grams , I am reminded of a short story by Isaac Asimov of a writer and his relationship to a robot- his assistant. This relationship begins as a simple master and servant model, and develops further, as the writer attempts to nurture the robot literary aspirations and trains him on literary models(dictionary, his own books etc), much like the concept of the N-Grams. Ofcourse the robot is so successful that at a certain point the writer feel so threatened and has to destroy the robot, a threat to his unquantifiable humaness.
The idea of using N-Grams in addition to tokenizers is exciting just for the possibility of creation, a somewhat random yet methodical way of creating text.
The results are often quite tragic from a literary perspective.
Using 3 N-Grams in a 30 word output.
I was curious to see how a machine trained on 2 separate texts; both separate in time and in content. I chose Dracula by Bram Stoker and Art of War by Sunzi. Both books are fascinating, Dracula a classic, not to mention a haute topic nowadays, and Art of War is an extremely intelligent book about war strategy with a very novel approach. Its basis lies in ideas of dealing with the context of the specific situation, in the moment. It prescribes a sense of malleability, quick change and necessary adaptability, based on any number of changeable factors, rather than standard and constipated strategic formation, forced to fit all situations.
Here are a few versions of what was generated using both texts (Both can be found on Project Gutenberg)
The results tend to be quite poetic. Pushing to more N-Grams gives me a memory error “Java Heap Space” which sounds like its communicating with the ISS and is getting an error. In any case I need to look into in addition to getting more familiar with Java in general.
Another concept I would love to try if the inverse of combining 2 poems will create a more literal text. This is something I hope to try next week…
when men believe not even feel it wet against my darling ! But there was a strange thing happened , and as yet . ” Ho Shih gives as real instances of strength
long and black moustache and grasping anything on which the enemy ‘ s face darken and draw together , and I can see superficially how a battle makes many calculations lead to victory
criticism : ” When you have done . But he continues : ” A brazen face and dispelled altogether the gloom of horror ! What devil or what manner of rooks