Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1.  
  2. public class TopDownParser {
  3.  
  4. String satz;
  5. int satzende = satz.length()+1;
  6. int wortAnzahl;
  7. String[] ableitung = new String[10];
  8. ableitung[0] = "S";
  9.  
  10. satz = "Der alte Mann starb";
  11.  
  12. public void parser(){
  13. while ((ableitung != "") && (wortAnzahl != satzende)){
  14. if ((ableitung == "")){
  15. break;
  16. }
  17. else {
  18. //ableitung = reduziere(expandiere(ableitung))
  19. }
  20. }
  21. }
  22.  
  23. public String expandiere(){
  24. // wähle eine Regel ri E R mit Left(ri) = First(linkSatzform)
  25. //Retung (Right(ri) + Rest(linkSatzform)
  26. }
  27.  
  28. public String reduziere(){
  29. //if (First(linkSatzform) € Vt) && (w_wort € First(linkSatzform)
  30. wortAnzahl = wortAnzahl +1;
  31. //reduziere(Rest(wortAnzahl))
  32. //else
  33. //Return(wortAnzahl)
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement