Help for this page

Select Code to Download


  1. or download this
    cat input.txt
    sun clo clo sun clo clo sun sun sun clo sun clo
    
  2. or download this
    analyse_text.pl --input-corpus input.txt --ngram-length 2 --output-sta
    +te mystate --separator ' '
    
  3. or download this
    {
      "counts" => { "clo|clo" => 2, "clo|sun" => 3, "sun|clo" => 4, "sun|s
    +un" => 2 },
    ...
      },
      "N" => 2,
    }
    
  4. or download this
    predict_text.pl --input-state mystate --separator ' '  --num-iteration
    +s 30 --seed 'clo'
    
  5. or download this
    /home/andreas/usr/bin/predict_text.pl : starting with seed 'clo' ...
    clo sun clo clo sun clo sun clo clo clo clo sun
    ...
    sun sun clo sun sun clo sun clo sun sun clo sun
    clo sun sun sun sun clo sun clo clo sun clo clo
    clo sun sun clo sun