Babbler

This is the use of an object pool to make a babbling program. The object pool is
created from wordnet as previously described.

The Babbler class below holds the object pool, which is a single Object with many objects in its branches list.
The babble() routine takes an object pointer. It picks an object randomly from the branches list of the passed in Object.
It then prints the lemma, and then recursively calls itself with either the Object in the branch, or the same object in the main object_pool branch list.

It produces the incoeherent text below.

class Babbler{
public:
  Object obj_pool;

  void babble(Object *);

};

void
Babbler::babble(Object * obj)
{

  if (obj->branches.size()==0){cout<<endl; return;}

  float r=((float)rand())/RAND_MAX;
  if (r==0 ||r==1){cout<<endl; return;}

  int count =r*obj->branches.size();
  list<Object>::iterator o=obj->branches.begin();
  for (int i=0; i!=count; i++,o++){}

  cout<< o->lemma <<"  ";

  Object* o1 = obj_pool.find_branch(o->lemma);
  if (o1==NULL) {cout<<"o1 null"<<endl; return;}

  r=((float)rand())/RAND_MAX;
  if (r<.5){
    babble(&(*o1));
  }
  else {
    babble(&(*o));
  }
}


void
Analyzer::babbler()
{
  Babbler babbler;

  fstream out_file;
  out_file.open("/home/kwd1/wordnet/test.obj", fstream::in | fstream::out );
  if (!out_file.is_open()) cout<<"open failed"<<endl;

  cout<<"loading"<<endl;
  babbler.obj_pool.load(out_file);
  cout<<"done"<<endl;

  for (int i=0; i<200; i++){
    babbler.babble(&(babbler.obj_pool));
  }

}







loading
done
silent_butler  is  a  meteorite  is  traditional  jazz  as  revived  their  customers  and  ligaments  and  connective  tissues  
nitroglycerin  is  amide  groups  
(1450-1500)  
pinnate_leaf  is  a  logjam  
mastership  is  the  zeal  of  amorphous  carbon  fuel  requirements  for  heating  homes  
enlisted_man  is  a  male  spokesperson  
versa  
Thyrsopteris  elegans  
simmered  in  welding  and  in  Virginia  that  reverses  direction  sinusoidally  
marshland  or  progress  of  eighteen  is  fictional  detective  in  novels  influenced  American  spicebush  and  scrawny  
palsy  is  rock  that  in  its  chest  when  opening  session  of  livestock  left  the  rancher  bankrupt  during  the  terminal  members  in  modern  Israel  
torchbearer  is  a  leader  during  India's  struggle  with  Great  
you,  do  you  even  so  unto  thee  any  barrier  to  Jeremiah  to  yes-no  questions  in  contact  against  which  the  kaffiyeh  
zebra's  
assisted_suicide  is  suicide  where  the  assistant  is  a  
two-year-old  sheep  pasturage  in  spasms  
almond_cookie  is  very  acute  smell  and  O  
Honduran_monetary_unit  is  batter  on  a  griddle  
grapheme  
ratios  among  people  during  his  ballads  composed  mostly  keyboard  music  
front-runner  is  close-in  firing  line  is  where  gold  leaf  
Cervus  is  understood  except  birds  customarily  migrate  
dismantles  buildings  as  a  job  
silent_butler  is  a  small  receptacle  fitted  beneath  rocks  in  Indo-European  languages  that  includes  parts  have  disappeared  and  forerunner  of  forcefulness  
nominated  by  lymph  which  is  eventually  form  irregular  colonies  with  convicted  in  narrowly  pyramidal  racemes  of  York  theater  pieces  transferred  if  fy,  x  is  the  bias  or  frightful  
Colombian_monetary_unit  is  monetary  unit  in  Colombia  
Sten_gun  is  a  finger  farthest  north  and  an  antihypertensive  and  suspension  
snow-on-the-mountain  is  annual  vine  bearing  clusters  opening  green  and  atrophy  of  printing  on  paper  coated  with  
paprika  then  mixed  drink  but  it  has  procured  nuclear  technology  and  delivery  
loose_sentence  is  a  complex  sentence  at  specified  job  
Nelumbonaceae  is  tenth  frame  
sweet_roll  is  any  of  violet-purple  flowers  mixed  seeds  marking  its  point  they  can  be  converted  into  standard  specie  
Louvre  in  solar  orbit  the  earth  
cracked-wheat_bread  is  bread  containing  10-15%  molybdenum  
mental_exhaustion  is  statesman  who  produces  a  tune  musical  instruments  
Church_of_Ireland  is  toothlike  scales  
hindgut  in  many  insects  known  
intensive_care  is  bath  water  depth  
moderate-sized  Asiatic  moth  or  toe  box  may  be  inherited  together  as  a  consequence  
Falconidae  is  then  be  calculated  
adenomatous_polyp  is  lobster  of  Atlantic  coast  of  
oystercatchers  
Academy_of_Television_Arts_and_Sciences  is  an  amputee  that  seems  best  instead  on  western  Finnish  people  taking  a  45  and  65  years  old  person  (as  gold  market  
relate  them  movable  
formally  educated  at  fever  pitch  between  two  notes  
scale_factor  is  a  gelatinous  umbrella-shaped  body  causing  blockage  of  Puerto  Rico  used  for  traffic  lanes  
red_valerian  is  European  mullein  with  chicken  casserole  is  prerecorded  laughter  of  punk  for  fuses  at  low  temperatures  and  can  be  used  molding  
Paris_University  is  a  university  in  Paris  
sales_department  is  the  division  in  deciphering  the  neighbors  in  order  Belemnoidea  in  some  threat  
occupational_disease  is  disease  or  disability  resulting  
wet  pastures  and  video  recording  barometer  is  an  adventive  weed  in  sooth  is  truth  or  reality  transcends  being  round  and  hard  disk  drive  it  looked  the  other  contest  
Haber  is  12  noon  and  evening  wear  (usually  with  whipped  egg  whites  and  anatomical  adaptations  of  ipecac  and  separated  or  divorced  
Brindisi  is  bamboos  
Ono  is  armed  conflict  research  project  from  1154  to  1485  to  1509  to  central  California  surrounded  on  all  sides  by  snake  marked  hyalinization  
deviation  from  geese  
aggravating  trouble  
mode  of  behavior  
adjusting  something  to  match  a  standard  treatment  received  signals  back  wall  and  could  get  that  derived  from  old  master  recording  machine  
lubricates  the  ready  for  hands  or  word  pattern  as  den  mother  to  ground  troops  
lamprey  is  primitive  method  and  adjusting  organ  transplant  to  determine  your  qualifications  that  you  shed  light  on  mosquitoes  but  operates  in  Germany  
porphyry  is  any  igneous  rock  with  
helium  for  scientific  experiments  
bailee  is  the  agent  to  reproduce  very  low  shelters  a  bell  of  Independence  Hall  where  passengers'  bags  on  the  dry  floor  of  
snip  is  removing  from  office  or  ensnares  its  retail  distributors  to  protest  action  by  thinking  about  frontier  period  
turbogenerator  is  generator  or  motor  
genus_Chrysanthemum  is  in  magnesium  silicate  is  a  12-volt  battery  was  dead  so  articulated  as  to  move  it  around  on  ice  in  which  cigarettes  or  froth  that  accumulates  at  the  modestness  of  the  living  standards  here  he  was  unbroken  expanse  is  epicondyle  is  a  swelling  caused  when  changes  in  the  density  
vassals  were  Zurvan's  offspring  which  are  sired  by  only  alternative  to  `resident'  or  `occupant'  
taste_property  is  a  force  applied  to  a  unit  area  as  heat  and  wateriness  of  his  uncle  was  his  comic  acts  or  responds  `I  only  rear  wheels  
speeder  is  suspended  inside  lining  
Daubentoniidae  is  comprising  solely  the  mythological  and  religious  paintings  portrayed  life  whereby  species  specific  genes  
thimble-shaped  mass  of  faces  
mists  etc.  
foreign-born  persons  from  one  country  or  disorderly  grouping  things  or  weight  of  goods  produced  directly  against  racial  discrimination  that  fails  to  transmit  electricity,  heat,  etc.  
sockeye  is  silver-white  in  Croatia  
genus_Shortia  is  evergreen  subshrub  of  the  people  do  to  earn  money  voted  by  British  Parliament  may  involve  loss  but  promises  a  profit  
braising  is  five-needled  pinon  of  southwestern  Virginia  for  coining  the  phrase  had  considerable  aptness  of  acetyl  compounds  to  produce  photochemical  reactions  leading  to  anaphylactic  shock  and  mat  over  individuals  for  gamma  rays  and  nuclear  technology  stocks  them  with  paralyzed  insects  for  thievery  
seven_seas  is  grampus  is  slaty-grey  head  
trapper  is  liability  to  Georgia  
math_teacher  is  someone  who  teaches  mathematics  
tracheophytes  in  existence  since  1970  to  uphold  Protestantism  and  larynx  and  undeveloped  flowers  
lever  is  flour  is  fine  line  printer  noted  as  a  resort  and  for  
manticore  is  cooler  than  106  pounds  
(1882-1964)  
cuisines  
Kiliwa  is  organization  in  potatoes  or  fruit  native  inhabitant  of  respiration  
Phrygia  who  was  said  that  might  become  magnetized  in  self-induced  relaxation  
adjectivally  and  longevity  by  means  heeled  over  on  the  enclosed  until  1988,  when  baseball  to  another  procedure  of  devising  something  
grande_dame  is  a  middle-aged  man  with  you  
benzoyl_group  is  the  univalent  hydrocarbon  radicals  
ridiculing  
philology  that  prepares  for  the  door  a  coagulation  of  the  tonka  bean  tree  branches  and  twigs  or  rule  for  the  syntax  of  residential  or  commercial  use  the  Yankees  scored  3  petals  and  glass  skyscrapers  (1886-1969)  
Lecanoraceae  is  well-branched  plant  that  will  climb  a  wall  
allocution  is  fermented  Mexican  drink  from  existence  
Eubryales  is  mosses  of  the  distinctive  blue-black  tongues  and  grooves  on  tracks  in  a  putter  is  the  iron  ores  are  sick  in  their  homes  to  print  produced  by  lithography  is  a  nephron  is  comprising  numerous  elongate  freshwater  cod  but  usually  smaller  
ice_skating  is  skating  on  ice  
Girondist  is  a  member  of  Basic  English  
withdrawn,  at  baptism  
Argiope  is  the  type  known  examples  of  oars  on  each  side  of  Lake  City  of  talc  having  curled  or  den  
oilskin  is  a  filamentous  projection  or  tab  or  diffusing  something  
measures  or  bristly  fly  whose  larvae  that  toward  which  you  are  twanged  while  descending  from  European  dead  nettle  with  white  flowers  
genus_Andromeda  is  low-growing  evergreen  or  training  
blindly  and  to  excess  
fuming  vesicatory  liquid  acid  HCOOH  found  his  niche  in  alliance  between  Bo  Hai  and  Korea  having  light-colored  non-durable  wood  of  soldier  whose  body  is  honored  as  pathogens  causing  Weil's  disease  by  rope  temporarily  by  external  agencies  
Laver  is  processing  data  that  is  often  infesting  animals  or  claret  cup  at  one  end  with  zero  eccentricity  
small_computer_system_interface  is  interface  consisting  mainly  of  decaying  leaves  
frogmouths  
Monaco  is  neoplasm  composed  principally  from  1307  to  bare  midriff  is  semiprecious  yellow  quartz  resembling  topaz  is  a  mineral  that  occurs  
crake  is  minimal  meaningful  language  or  urgency  
Eris  is  goddess  of  discord  
print_seller  is  cherry  much  liked  to  waxy  wing  that  early  part  anything  considered  obscene  words  for  vaginal  lavage  and  enemas  
maiden_flight  is  the  first  flight  muscles:  ostriches  and  emus:  recent  uprising  
Mahayanism  is  the  religious  sectarianism  
genus_Galago  is  bush  with  plumlike  purple  pulp  cavity  leading  to  the  nasopharynx  
likenesses  of  sanitation  
ejection_seat  is  redness  of  the  snow  equals  seven  
weaverbirds  often  kept  as  size  during  childhood  
`viscus'  
Tevet  10  commemorates  three  paths  or  disguises  an  animal's  foot  between  the  toes  connected  by  terrestrial  game  (as  in  cricket  bat  has  a  narrow  handle  shaped  like  the  butt  is  manufacturing  or  mining  or  growing  a  crystal  layer  enclosing  something  in  litigation  so  that  usually  scarlet-crimson  flowers  mottled  skin  diving  bird  of  pine  lumber  with  essence  from  complexity  
bacterium  Salmonella  typhosa  ingested  with  contempt  expressed  ideas  indirectly  via  symbols  1,2,3,4,5,6,7,8,9,0  
Virchow  is  mayflies  
handcart  is  incapability  of  existing  or  occurring  
professional_wrestling  is  trail  over  assets  
leak  is  threat  of  refuting  by  chemical  industry  for  drilling  and  invention  and  hence  the  suspect  is  cobras  
axes  for  larger  one  phoenix  lived  at  a  time  he  succeeded  
led  is  numerically  equal  one  quart  
Gospels,  Acts  of  the  helper  T  cells  can  engulf  and  digest  milk  fermented  juice  of  black  hunting  grounds  
speechwriter  is  a  tuition  free  school  colors  was  unfortunate  
musketeer  is  preparing  or  putting  through  Triassic  
declivity  
Boreas  was  hired  to  round  clams  casino  is  a  confusing  assortment  
Gell-Mann  is  United  Brethren  Church  in  1245  that  excommunicated  Holy  Roman  who  was  applied  to  both  sides  are  bound  in  one  material  
cogwheel  on  lava  flows  of  Hawaiian  Islands  and  Azores  that  is  dense  with  melted  beeswax  
Revolution,  notably  in  doing  household  laundry  is  garments  or  white  goods  while  leaving  an  article  it  looked  at  me  in  astonishment  is  the  feeling  that  idealizes  or  court  papers  to  yellow  fertile  body  not  stay  between  the  corporation  and  Corvus  
funambulism  is  divination  through  Washington  and  Oregon  and  guerrilla  group  of  the  Communist  
anatomical  dissection  
tax_benefit  is  social  status  or  position  conferred  
lumbering  to  free  a  trump  can  take  a  tasty  mixture  to  be  spread  
22nd  or  stimulus  and  south  shore  of  Lake  Erie  in  1873  
burp_gun  is  hominy  prepared  by  bleaching  in  Mongolia  is  tastelessness  by  virtue  is  its  own  reward  
red-necked_grebe  is  large  moving  van  
lexical_meaning  is  participating  in  athletic  sports  event  (game  or  parade)  
breaking_off  is  lights  moving  in  shifting  patterns  
resh  is  the  distinction  drawn  along  the  floor  complained  that  school  but  his  services  
tonic_solfa  is  ornamented  canopy  made  illegally  
smoulder  is  a  fire  that  mountain  is  consumption  is  carcinoma  of  Simon  Bolivar  founded  Disneyland  
workaholic  is  scrambling  fern  family  Ophioglossaceae  is  loose  gown  for  addiction  was  the  justification  of  barbarous  means  rather  than  by  unusual  powers  that  data  relating  to  births  and  understanding  derived  by  replacing  two  vectors  they  questioned  about  religious  reforms  made  Sweden  who  can  invest  in  a  repeating  over  and  again  
cluster_of_differentiation_4  is  language  that  is  infection  caused  by  an  anticoagulant  use  to  input  
freeze-drying  is  a  workplace  away  from  a  check  given  integer  
high_season  is  cliff  brake  of  jumpers  to  configure  the  machine  
genus_Helvella  is  type  genus  of  the  teats  where  pumps  are  forbidden  to  tackle  or  trip  in  1493  
remedied  
breadroot  is  indirect  request  from  door  to  corporate  executives  lucrative  benefits  to  a  foolhardy  competition  at  which  face  belied  her  feelings  
autonomic_nervous_system  is  genes  into  ponderousness  
costmary  is  looseness  of  detergents  used  for  savings  and  checking  for  errors  in  high-speed  motor  nerve  agent,  synthesized  by  German  army  ant  swarms  stripping  large  areas  of  antidepressant  drugs  before,  during,  and  after  surgery  concerned  about  propriety  and  comfort  in  almost  all  areas  or  recent  clearings  
Zulu  healer  and  registered  symbol  (usually  equipped  for  preparing  sheepskins  as  parchment  and  rolled  steel  grey  metallic  mineral  found  in  levying  by  each  nation  is  very  spiny  carapace  that  require  separation  into  sentences  or  the  mesothelium  is  petroleum  bought  100  shares  of  inadequate  amount  
Vanern  in  Sweden  
fees  for  performing  in  rocky  islands  off  something  
everyday  life  free  swinging  stick  at  the  end  organ  on  the  irresistibility  is  Javanese  foliage  plant  material  tied  around  the  forehead  or  
east  Asia  approximately  36  pounds  
Hilbert  is  German  mathematician  is  a  person  skilled  typist  who  can  type  a  
nitrogen_cycle  is  unpleasantly  scented  usually  elongated  tapering  body  having  rough  loose  pile  running  play  in  which  a  mission  objectives  
daylight-saving_time  is  time  certain  activities  began  at  jumping  as  forming  a  whole  
intractability  is  the  premolars  
legislating  
malformed  or  earl  or  stone  talismans  
sugar_daddy  is  eleventh  hour  
giant_schnauzer  is  quillworts  
sheik  is  recovered  Jerusalem  around  as  citizens  
war_god  is  a  god  worshipped  as  
pina_cloth  is  a  terrier  from  feelings  freely  
negative_correlation  is  rape  in  which  those  faithful  to  Kenya  and  understands  it  
(1854-1925)  
sticklebacks  
Schreiber's_aster  is  combined  Marxist-Leninist  ideology  with  birch  with  silvery  white  cheese  made  no  compensating  balance  for  weighing  a  given  number  of  militarizing  again  
fuel  efficiency  or  assure  the  Klamath  river  valley  in  beer  made  prepayments  to  an  unruly  mob  by  uprights  with  alum  and/or  salt  grass  
swordfishes  
American_oil_palm  is  written  to  Islam  is  prayer  rug  used  fabricated  data  
pull-in  is  a  shocking  surprise  
cyan,  and  symphonies  and  kidnapped  children  who  were  only  17  votes  in  Broadway  is  waterlines  to  patch  woodwork  or  makes  charitable  donations  intended  spot  checks  ensure  a  high  polish  and  is  used  for  trailers  or  vans  
femur  and  rectangular  part  way  down  today  the  whir  of  space  quantization  in  active  warfare  and  old-fashioned  
Greenback_Party  is  orange-flowered  lily  of  delaying  or  interrupting  the  continuity  with  shirt  made  little  green  monkeys  caused  by  piers  used  depending  on  the  number  yields  very  wealthy  man  
miterwort  is  soybeans  bought  Manhattan  from  stick  lac  refined  sensitivity  to  30%  off  easily  accessible  only  to  assemble  books  with  the  untroubled  kingdom  and  dinner  
cruel_and_unusual_punishment  is  rough  shelter  whose  currencies  are  sensory  systems  associated  temporarily  in  some  strains  of  Chesapeake  Bay  to  the  south  along  the  males  of  certain  molluscs  containing  trophies  honoring  all  the  reconditeness  of  the  individual  and  amortization  have  any  proof  for  classifying  into  files  or  goes  into  the  production  achieved  final  words  were  supposed  ability  that  began  in  folklore  and  myth  is  gingerbread  is  cake  spread  with  jelly  based  (1879-1963)  
Japanese_deity  is  renewed  suspension  of  insoluble  particles  after  
Buzzards  Bay  on  income  that  is  not  constituting  a  conventional  or  enlisted  status  
leading_man  is  actor  who  reinterpreted  Christian  doctrine  and  law  of  signs  for  astrological  year  when  the  sun  enters  a  person  concerning  two  soft  fleshy  saprophytic  imperfect  pearl  
Tanacetum  is  a  fanjet  engine  through  which  burned  gases  from  LSU  
mask  of  friendship  was  annulled  in  1152  and  she  
wild_cherry  is  masonry  used  scanners  to  legend  they  were  implemented  social  reforms  including  the  `underground'  
timber_tree  is  rubbed  into  modern  English  electrical  engineer  who  shortens  or  abridges  or  believe  readily  seen  with  the  unaided  eye  muscles  are  attached  storage  chest  for  personal  property  
Campanula  having  striped  in  defecating  
widgeon  is  box-shaped  baby  bed  with  handles  business  affairs  in  all  lightness  and  joy  or  mirth  or  refinement  is  the  Russia  that  is  gene  on  bacteria  similar  to  originate  on  birds  and  Balkan  Peninsula  in  Saudi  Arabia  whose  duty  it  happens  to  be  available  for  doing  manual  labor  for  six  flavors  of  synesthesia  in  snow  
Edwards  is  counting  the  number  designating  place  by  telephone  installation  is  singing  jazz  
orioles  of  the  American  toad  lives  outside  of  G.  B.  Shaw  or  his  mistress  of  Admiral  Dewey  defeated  Mark  Antony  and  potato  and  cucumber  families  
choral  composition  with  sacred  fire  in  her  temple  
flattering  commendation  
pygmy_sperm_whale  is  favorable  to  the  person  who  
cartridges  from  a  suppressor  gene  of  secondary  sex  organs  are  reduced  in  intensity  is  the  amount  less  attractive  man  
marathon  tests  a  runner's  feet  at  germination  
solutions:  one  sixth  of  stilts

Related

Wiki: Home

MongoDB Logo MongoDB