/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Syllabizator;

import static Syllabizator.Syllabizator.syllabize;

/**
 *
 * @author Jarek
 */
public class Main
{
    public static void main(String[] args)
    {
        Net net = new Net();
        String[] tmp = syllabize("jarosław","PL").split("-");
        net.add(tmp[0], null);
        net.add(tmp[1], tmp[0]);
        net.add(tmp[1], tmp[0]);
        net.add(tmp[1], tmp[0]);
        net.add(tmp[1], tmp[0]);
        net.add(tmp[2], tmp[0]);
        net.add(tmp[2], tmp[0]);
        net.add(tmp[2], tmp[0]);
        net.add(tmp[2], tmp[1]);
        return;
    }
}

@@ -264,240 +264,766 @@
 e;%0D%0A
-%0D%0A/**%0D%0A *%0D%0A * @author Jarek%0D%0A */%0D%0Apublic class Main%0D%0A%7B%0D%0A    public static void main(String%5B%5D args)%0D%0A    %7B%0D%0A        Net net = new Net();%0D%0A        String%5B%5D tmp = syllabize(%22jaros%C5%82aw%22,%22PL%22).split(%22-%22);%0D%0A        net.add(tmp%5B0%5D, null);%0D%0A
+import java.io.BufferedReader;%0D%0Aimport java.io.FileNotFoundException;%0D%0Aimport java.io.FileReader;%0D%0Aimport java.io.IOException;%0D%0Aimport java.util.logging.Level;%0D%0Aimport java.util.logging.Logger;%0D%0A%0D%0A/**%0D%0A *%0D%0A * @author Jarek%0D%0A */%0D%0Apublic class Main%0D%0A%7B%0D%0A    public static void main(String%5B%5D args)%0D%0A    %7B%0D%0A        Net net = new Net();%0D%0A        String%5B%5D tmp;%0D%0A        try %7B%0D%0A            BufferedReader br = new BufferedReader(new FileReader(%22slowa.txt%22));%0D%0A            String word = br.readLine();%0D%0A            while(word != null)%7B%0D%0A                tmp = syllabize(word, %22PL%22).split(%22-%22);%0D%0A                for (int i=0; i%3Ctmp.length; i++)%7B%0D%0A                    if(i == 0)%0D%0A                        net.add(tmp%5B0%5D, null);%0D%0A                    else%0D%0A                
     
@@ -1034,33 +1034,35 @@
 net.add(tmp%5B
-1
+i
 %5D, tmp%5B
-0
+i-1
 %5D);%0D%0A       
@@ -1066,132 +1066,528 @@
     
-net.add(tmp%5B1%5D, tmp%5B0%5D);%0D%0A        net.add(tmp%5B1%5D, tmp%5B0%5D);%0D%0A        net.add(tmp%5B1%5D, tmp%5B0%5D);%0D%0A        net.add(tmp%5B2%5D, tmp%5B0%5D
+        %7D%0D%0A                word = br.readLine();%0D%0A            %7D%0D%0A            br.close();%0D%0A        %7D catch (FileNotFoundException ex) %7B%0D%0A            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);%0D%0A            return;%0D%0A        %7D catch (IOException ex) %7B%0D%0A            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);%0D%0A        %7D%0D%0A        net.setUnconditionalProbs();%0D%0A        net.setConditionalProbs();%0D%0A        for(int i=0; i%3C100; i++)%7B%0D%0A            Node tmp2 = net.getFirstSyllable(
 );%0D%0A
@@ -1598,117 +1598,271 @@
     
+   
-net.add(tmp%5B2%5D, tmp%5B0%5D);%0D%0A        net.add(tmp%5B2%5D, tmp%5B0%5D);%0D%0A        net.add(tmp%5B2%5D, tmp%5B1%5D);%0D%0A        return;
+ System.out.print(tmp2.getSyllable());%0D%0A            tmp2 = tmp2.nextNode();%0D%0A            System.out.print(tmp2.getSyllable());%0D%0A            tmp2 = tmp2.nextNode();%0D%0A            System.out.print(tmp2.getSyllable());%0D%0A            System.out.println();%0D%0A        %7D
 %0D%0A  

Update Main.java