forked from GitHub/gf-core
*** empty log message ***
This commit is contained in:
@@ -2,20 +2,16 @@
|
|||||||
--
|
--
|
||||||
-- Aarne Ranta, Janna Khegai 2003
|
-- Aarne Ranta, Janna Khegai 2003
|
||||||
|
|
||||||
resource ExtraIta = open ResourceIta, Prelude, SyntaxIta, MorphoIta in {
|
resource ExtraIta = open PredicationIta, Prelude, SyntaxIta, MorphoIta, ResourceIta in {
|
||||||
|
|
||||||
oper
|
oper
|
||||||
NPLock = NounPhrase ** {lock_NP : {}} ;
|
|
||||||
CNLock = CommNounPhrase ** {lock_CN : {}} ;
|
|
||||||
SLock = Sentence ** {lock_S : {}} ;
|
|
||||||
oper
|
|
||||||
|
|
||||||
averBisogno : CN -> VP = \cn ->
|
averBisogno : CN -> VP = \cn ->
|
||||||
PosVG (PredTV (mkTransVerbPrep (verbPres avere) "bisogno"** {lock_TV = <>}) (IndefOneNP cn)) ;
|
PosVG (PredTV (mkTransVerbPrep (verbPres avere) "bisogno"** {lock_TV = <>}) (IndefOneNP cn)) ;
|
||||||
|
|
||||||
-- the following are too low-level and should be provided by the resources
|
-- the following are too low-level and should be provided by the resources
|
||||||
|
|
||||||
injuredBody: AP -> NPLock -> CNLock -> SLock = \injured, patient, head ->
|
injuredBody: AP -> NP -> CN -> S = \injured, patient, head ->
|
||||||
(PredVP patient
|
(PredVP patient
|
||||||
{s = \\g,v => pronRefl patient.n patient.p ++
|
{s = \\g,v => pronRefl patient.n patient.p ++
|
||||||
verbEssere.s ! v ++
|
verbEssere.s ! v ++
|
||||||
@@ -29,10 +25,6 @@ oper
|
|||||||
|
|
||||||
datAdv : NP -> AdV = \np ->
|
datAdv : NP -> AdV = \np ->
|
||||||
{s = np.s ! Aton dative; lock_AdV = <> } ;
|
{s = np.s ! Aton dative; lock_AdV = <> } ;
|
||||||
|
|
||||||
-- from Predication:
|
|
||||||
predV2: TransVerb -> NPLock -> NounPhrase -> SLock = \F, x, y ->
|
|
||||||
predVerbPhrase x ((predVerbGroup True) (complTransVerb F y)) ** { lock_S = <>} ;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,21 @@
|
|||||||
-- use this path to read the grammar from the same directory
|
-- use this path to read the grammar from the same directory
|
||||||
--# -path=.:../newresource/abstract:../prelude:../newresource/italian:../newresource/romance
|
--# -path=.:../newresource/abstract:../prelude:../newresource/italian:../newresource/romance
|
||||||
|
|
||||||
concrete HealthIta of Health = open ResourceIta, Prelude, SyntaxIta, ExtraIta, MorphoIta in {
|
concrete HealthIta of Health = open ResourceIta, Prelude, SyntaxIta, ExtraIta, MorphoIta, ParadigmsIta, ResourceExtIta, PredicationIta in {
|
||||||
|
|
||||||
flags
|
flags
|
||||||
startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
|
startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
|
||||||
|
lincat
|
||||||
|
Patient = NP ;
|
||||||
|
BodyPart = CN ;
|
||||||
|
Symptom = NP ;
|
||||||
|
SymptomDegree = AP ;
|
||||||
|
Prop = S ;
|
||||||
|
Illness = CN ;
|
||||||
|
Condition = VP ;
|
||||||
|
Specialization = CN ;
|
||||||
|
Medicine = CN ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
ShePatient = SheNP ;
|
ShePatient = SheNP ;
|
||||||
TheyPatient = TheyNP ;
|
TheyPatient = TheyNP ;
|
||||||
@@ -17,31 +27,14 @@ lin
|
|||||||
illness) ;
|
illness) ;
|
||||||
|
|
||||||
BeInCondition = PredVP ;
|
BeInCondition = PredVP ;
|
||||||
|
CatchCold = PosTV (tvDir vAvere) (IndefOneNP (mkCN (nSale "raffreddore" masculine))) ;
|
||||||
CatchCold =
|
|
||||||
PosTV (tvDir vAvere) (IndefOneNP (mkCN (nSale "raffreddore"
|
|
||||||
masculine))) ;
|
|
||||||
|
|
||||||
Pregnant = PosA (apSolo "gravido" postpos) ;
|
Pregnant = PosA (apSolo "gravido" postpos) ;
|
||||||
|
|
||||||
Complain = predV2 (tvDir vAvere) ;
|
Complain = predV2 (tvDir vAvere) ;
|
||||||
|
|
||||||
PainInMod pat loc deg =
|
|
||||||
PredVP pat
|
|
||||||
(AdvVP (PosTV (tvDir vAvere)
|
|
||||||
(IndefOneNP (ModAdj deg (mkCN (nSale "dolore"
|
|
||||||
masculine)))))
|
|
||||||
(datAdv (DefOneNP loc))) ;
|
|
||||||
|
|
||||||
FeverMod deg = partitNP (ModAdj deg (mkCN (nSale "febbre" feminine)));
|
|
||||||
|
|
||||||
PainIn pat loc =
|
PainIn pat loc =
|
||||||
PredVP pat (AdvVP (PosV (averCosa "male")) (datAdv (DefOneNP loc))) ;
|
PredVP pat (AdvVP (PosV (averCosa "male")) (datAdv (DefOneNP loc))) ;
|
||||||
|
|
||||||
Fever = partitNP (mkCNomReg (nSale "febbre" feminine)) ;
|
Fever = partitNP (mkCN (nSale "febbre" feminine)) ;
|
||||||
|
|
||||||
High = apSolo "alto" postpos ;
|
|
||||||
Terrible = apTale "terribile" postpos ;
|
|
||||||
Head = mkCN (nRana "testa") ;
|
Head = mkCN (nRana "testa") ;
|
||||||
Leg = mkCN (nRana "gamba") ;
|
Leg = mkCN (nRana "gamba") ;
|
||||||
|
|
||||||
@@ -49,14 +42,22 @@ masculine)))))
|
|||||||
PainKiller = mkCN (nSale "calmante" masculine) ;
|
PainKiller = mkCN (nSale "calmante" masculine) ;
|
||||||
NeedDoctor pat doc = PredVP pat (averBisogno doc) ;
|
NeedDoctor pat doc = PredVP pat (averBisogno doc) ;
|
||||||
NeedMedicine pat med = PredVP pat (averBisogno med) ;
|
NeedMedicine pat med = PredVP pat (averBisogno med) ;
|
||||||
TakeMedicine pat med = predV2 (tvDir (vCorrere "prendere")) pat
|
TakeMedicine pat med = predV2 (tvDir (vCorrere "prendere" "")) pat (IndefOneNP med) ;
|
||||||
(IndefOneNP med) ;
|
|
||||||
|
|
||||||
Injured = injuredBody (mkAdjective (adjSolo "ferito") True) ;
|
Injured = injuredBody (apSolo "ferito" prepos) ;
|
||||||
Broken = injuredBody (mkAdjective (adjSolo "rotto") True) ;
|
Broken = injuredBody (apSolo "rotto" prepos) ;
|
||||||
|
|
||||||
And = conjS ;
|
And = conjS ;
|
||||||
|
|
||||||
|
-- FeverMod deg = partitNP (ModAdj deg (mkCN (nSale "febbre" feminine)));
|
||||||
|
-- High = apSolo "alto" postpos ;
|
||||||
|
-- Terrible = apTale "terribile" postpos ;
|
||||||
|
-- PainInMod pat loc deg =
|
||||||
|
-- PredVP pat
|
||||||
|
-- (AdvVP (PosTV (tvDir vAvere)
|
||||||
|
-- (IndefOneNP (ModAdj deg (mkCN (nSale "dolore" masculine)))))
|
||||||
|
-- (datAdv (DefOneNP loc))) ;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class GFEditor2 extends JFrame implements ActionListener, CaretListener,
|
|||||||
public MouseEvent m2;
|
public MouseEvent m2;
|
||||||
public static String selectedText="";
|
public static String selectedText="";
|
||||||
|
|
||||||
public static boolean debug = false;
|
public static boolean debug = true;
|
||||||
public static boolean debug3 = false;
|
public static boolean debug3 = false;
|
||||||
public static boolean debug2 = false;
|
public static boolean debug2 = false;
|
||||||
public static boolean selectionCheck = false;
|
public static boolean selectionCheck = false;
|
||||||
@@ -941,6 +941,20 @@ System.out.println("encoding "+defaultEncoding);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void recursion(JMenu subMenu, Font font)
|
||||||
|
{
|
||||||
|
for (int i = 0; i<subMenu.getItemCount(); i++)
|
||||||
|
{
|
||||||
|
JMenuItem item = subMenu.getItem(i);
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
item.setFont(font);
|
||||||
|
String name = item.getClass().getName();
|
||||||
|
System.out.println(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void actionPerformed(ActionEvent ae)
|
public void actionPerformed(ActionEvent ae)
|
||||||
{
|
{
|
||||||
boolean abs = true;
|
boolean abs = true;
|
||||||
@@ -958,7 +972,51 @@ System.out.println("encoding "+defaultEncoding);
|
|||||||
field.setFont(font);
|
field.setFont(font);
|
||||||
tree.tree.setFont(font);
|
tree.tree.setFont(font);
|
||||||
list.setFont(font);
|
list.setFont(font);
|
||||||
}
|
sizeList.setFont(font);
|
||||||
|
sizeLabel.setFont(font);
|
||||||
|
save.setFont(font);
|
||||||
|
fontList.setFont(font);
|
||||||
|
fontLabel.setFont(font);
|
||||||
|
grammar.setFont(font);
|
||||||
|
open.setFont(font);
|
||||||
|
newTopic.setFont(font);
|
||||||
|
gfCommand.setFont(font);
|
||||||
|
leftMeta.setFont(font);
|
||||||
|
left.setFont(font);
|
||||||
|
top.setFont(font);
|
||||||
|
right.setFont(font);
|
||||||
|
rightMeta.setFont(font);
|
||||||
|
read.setFont(font);
|
||||||
|
alpha.setFont(font);
|
||||||
|
random.setFont(font);
|
||||||
|
undo.setFont(font);
|
||||||
|
ok.setFont(font);
|
||||||
|
cancel.setFont(font);
|
||||||
|
inputLabel.setFont(font);
|
||||||
|
browse.setFont(font);
|
||||||
|
termReadButton.setFont(font);
|
||||||
|
stringReadButton.setFont(font);
|
||||||
|
filter.setFont(font);
|
||||||
|
modify.setFont(font);
|
||||||
|
statusLabel.setFont(font);
|
||||||
|
menuBar.setFont(font);
|
||||||
|
menu.setFont(font);
|
||||||
|
|
||||||
|
submenu.setFont(font);
|
||||||
|
recursion(submenu, font);
|
||||||
|
modeMenu.setFont(font);
|
||||||
|
recursion(modeMenu, font);
|
||||||
|
langMenu.setFont(font);
|
||||||
|
recursion(langMenu, font);
|
||||||
|
fileMenu.setFont(font);
|
||||||
|
recursion(fileMenu, font);
|
||||||
|
viewMenu.setFont(font);
|
||||||
|
recursion(viewMenu, font);
|
||||||
|
|
||||||
|
cbMenuItem.setFont(font);
|
||||||
|
rbMenuItem.setFont(font);
|
||||||
|
fileMenuItem.setFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
if ( obj == menu ) {
|
if ( obj == menu ) {
|
||||||
if (!menu.getSelectedItem().equals("New"))
|
if (!menu.getSelectedItem().equals("New"))
|
||||||
@@ -1102,6 +1160,7 @@ System.out.println("encoding "+defaultEncoding);
|
|||||||
}
|
}
|
||||||
submenu.removeAll();
|
submenu.removeAll();
|
||||||
|
|
||||||
|
|
||||||
File file = fc1.getSelectedFile();
|
File file = fc1.getSelectedFile();
|
||||||
// opening the file for editing :
|
// opening the file for editing :
|
||||||
if (debug) System.out.println("opening: "+ file.getPath().replace('\\','/'));
|
if (debug) System.out.println("opening: "+ file.getPath().replace('\\','/'));
|
||||||
@@ -1126,31 +1185,27 @@ System.out.println("encoding "+defaultEncoding);
|
|||||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||||
File file = fc.getSelectedFile();
|
File file = fc.getSelectedFile();
|
||||||
// importing a new language :
|
// importing a new language :
|
||||||
if (debug) System.out.println("importing: "+ file.getPath());
|
|
||||||
|
|
||||||
langMenu.removeAll();
|
langMenu.removeAll();
|
||||||
|
|
||||||
AbstractButton ab = null;
|
AbstractButton ab = null;
|
||||||
|
|
||||||
while (languageGroup.getButtonCount()>0)
|
while (languageGroup.getButtonCount()>0)
|
||||||
{
|
{
|
||||||
for (Enumeration e = languageGroup.getElements();
|
for (Enumeration e = languageGroup.getElements();
|
||||||
e.hasMoreElements() ;)
|
e.hasMoreElements() ;)
|
||||||
{
|
{
|
||||||
ab = (AbstractButton)e.nextElement();
|
ab = (AbstractButton)e.nextElement();
|
||||||
System.out.println("more to remove ! "+ab.getText());
|
if (debug) System.out.println("more to remove ! "+ab.getText());
|
||||||
languageGroup.remove(ab);
|
languageGroup.remove(ab);
|
||||||
}
|
}
|
||||||
System.out.println("languageGroupElement after import removal "+
|
if (debug) System.out.println("languageGroupElement after import removal "+
|
||||||
languageGroup.getButtonCount());
|
languageGroup.getButtonCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
submenu.removeAll();
|
submenu.removeAll();
|
||||||
|
//menu.removeAllItems();
|
||||||
menu.removeAllItems();
|
System.out.println("importing: "+ file.getPath().replace('\\','/'));
|
||||||
menu.addItem("New");
|
menu.addItem("New");
|
||||||
fileString ="";
|
fileString ="";
|
||||||
send("i "+ file.getPath().replace('\\','/'));
|
send("i "+ file.getPath().replace('\\','/'));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1207,6 +1262,7 @@ System.out.println("encoding "+defaultEncoding);
|
|||||||
parseInput = s;
|
parseInput = s;
|
||||||
//s = "gf "+s; This is for debugging, otherwise shift the comment to the next line.
|
//s = "gf "+s; This is for debugging, otherwise shift the comment to the next line.
|
||||||
treeChanged = true;
|
treeChanged = true;
|
||||||
|
System.out.println("sending: "+ s);
|
||||||
send(s);
|
send(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1824,7 +1880,7 @@ System.out.println("encoding "+defaultEncoding);
|
|||||||
} //if selectionStart>-1
|
} //if selectionStart>-1
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.out.println("NO SELECTION IN THE TEXT TO BE APPENDED!");
|
if (debug2) System.out.println("NO SELECTION IN THE TEXT TO BE APPENDED!");
|
||||||
//cutting tags from previous focuses if any:
|
//cutting tags from previous focuses if any:
|
||||||
int r = restString.indexOf("</subtree>");
|
int r = restString.indexOf("</subtree>");
|
||||||
while (r>-1)
|
while (r>-1)
|
||||||
|
|||||||
Reference in New Issue
Block a user