home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1988 / 01 / prolog / parsbsp3.pro < prev    next >
Encoding:
Text File  |  1987-10-29  |  2.4 KB  |  72 lines

  1. "Beispielprogramm 3 - W. Kreitmair"
  2. "Automatische Sprachanalyse mit PROLOG II"
  3.  
  4. ist-ein-Satz(x) ->
  5.                   transformiere-in-Graphen(x,1,S-atzendeNummer)
  6.                   /
  7.                   Kante(SATZ,1,S-atzendeNummer);
  8.  
  9. transformiere-in-Graphen(x.y,n,e-n) ->
  10.                   val(add(n,1),e-n1)
  11.                   assert(Kante(x,n,e-n1),nil)
  12.                   transformiere-in-Graphen(y,e-n1,e-n);
  13. transformiere-in-Graphen(nil,n,n) ->;
  14.                   
  15.  
  16.  
  17. Kante(SATZ,i,j) -> Kante(NP,i,i1)   Kante(VP,i1,j);
  18.  
  19. Kante(NP,i,j) -> Kante(EIGENNAME,i,j);
  20. Kante(NP,i,j) -> Kante(ADJEKTIV,i,i1)   Kante(NOMEN,i1,j);
  21. Kante(NP,i,j) -> Kante(ARTIKEL,i,i1)  Kante(ADJEKTIV,i1,i2)  
  22.                  Kante(NOMEN,i2,j);
  23. Kante(NP,i,j) -> Kante(ARTIKEL,i,i1)  Kante(NOMEN,i1,i2)  
  24.                  Kante(RELATIVSATZ,i2,j);
  25.  
  26. Kante(VP,i,j) -> Kante(VERB,i,j);
  27. Kante(VP,i,j) -> Kante(KOPULA,i,i1)  Kante(ADJEKTIV,i1,j);
  28. Kante(VP,i,j) -> Kante(VERB,i,i1)  Kante(NP,i1,j);
  29.  
  30. Kante(VP',i,j) -> Kante(ADJEKTIV,i,i1)  Kante(KOPULA,i1,j);
  31. Kante(VP',i,j) -> Kante(VERB,i,j); 
  32. Kante(VP' ,i,j) ->Kante(NP,i,i1)  Kante(VERB,i1,j);
  33.  
  34. Kante(RELATIVSATZ,i,i) -> ;
  35. Kante(RELATIVSATZ,i,j) -> Kante(RELATIV-PRONOMEN,i,i1)  Kante(VP',i1,j);
  36.  
  37. Kante(ARTIKEL,i,j) -> Kante(UNBEST-ARTIKEL,i,j);
  38. Kante(ARTIKEL,i,j) -> Kante(BEST-ARTIKEL,i,j);
  39.  
  40. Kante(VERB,i,j) -> Kante(schlaeft,i,j);
  41. Kante(VERB,i,j) -> Kante(kuesst,i,j);
  42. Kante(VERB,i,j) -> Kante(liebt,i,j);
  43. Kante(VERB,i,j) -> Kante(heiratet,i,j);
  44.  
  45. Kante(KOPULA,i,j) -> Kante(ist,i,j);
  46.  
  47. Kante(NOMEN,i,j) -> Kante(Mann,i,j);
  48. Kante(NOMEN,i,j) -> Kante(Liebhaber,i,j);
  49. Kante(NOMEN,i,j) -> Kante(Ehefrau,i,j);
  50. Kante(NOMEN,i,j) -> Kante(Freundin,i,j);
  51.  
  52. Kante(EIGENNAME,i,j) -> Kante(Helmut,i,j);
  53. Kante(EIGENNAME,i,j) -> Kante(Rita,i,j);
  54.  
  55. Kante(RELATIV-PRONOMEN,i,j) -> Kante(der,i,j);
  56. Kante(RELATIV-PRONOMEN,i,j) -> Kante(die,i,j);
  57.  
  58. Kante(ADJEKTIV,i,j) -> Kante(jung,i,j);
  59. Kante(ADJEKTIV,i,j) -> Kante(junge,i,j);
  60. Kante(ADJEKTIV,i,j) -> Kante(feurig,i,j);
  61. Kante(ADJEKTIV,i,j) -> Kante(feurige,i,j);
  62. Kante(ADJEKTIV,i,j) -> Kante(betrogene,i,j);
  63.  
  64. Kante(UNBEST-ARTIKEL,i,j) -> Kante(ein,i,j);
  65. Kante(UNBEST-ARTIKEL,i,j) -> Kante(eine,i,j);
  66.  
  67. Kante(BEST-ARTIKEL,i,j) -> Kante(der,i,j);
  68. Kante(BEST-ARTIKEL,i,j) -> Kante(die,i,j);
  69. Kante(BEST-ARTIKEL,i,j) -> Kante(den,i,j);
  70.  
  71. ST-ARTIKEL,i,j) -> Kante(der,i,j);
  72. Kante(BEST-ARTIKEL,i,j) -> Kante(die,i,j)