Skip to content

Commit 7e757e4

Browse files
committed
Remove references to APE grammar rules
+ small updates in the report.
1 parent b2c292f commit 7e757e4

File tree

4 files changed

+11
-57
lines changed

4 files changed

+11
-57
lines changed

docs/d11_1/d11_1.tex

+8-6
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,17 @@ \subsection{Comparison of Codeco and GF}
274274
The definite NP cannot be used after `there is' because the
275275
declared features \verb!def:+! and \verb!def:-! do not unify.
276276

277-
Most of the Codeco features are syntactic in nature and therefore map to
277+
Most of the Codeco features are syntactic in nature (e.g. `case', `pl', `whin')
278+
and can be therefore handled in
278279
GF's concrete grammar which offers structures similar to Codeco's feature
279280
sets and operations similar to Codeco's unification. However, some of the
280-
Codeco features are semantic in nature (e.g. `exists') and should therefore be
281+
Codeco features are semantic in nature (e.g. `def', `exist')
282+
and should therefore be
281283
implemented in GF's abstract grammar where such unification-style rules are
282284
not possible. In neither case is a direct mapping of Codeco grammar rules
283285
and features to a GF grammar functions and categories possible.
284-
[TODO: go over the Codeco features and see what corresponds to them
285-
in GF, if it should belong to the concrete or the abstract part.]
286+
%[TODO: go over the Codeco features and see what corresponds to them
287+
%in GF, if it should belong to the concrete or the abstract part.]
286288

287289
In the Codeco subset anaphoric references can be made via definite noun
288290
phrases (`the man') and variables (`X'). In order for an anaphoric reference
@@ -390,7 +392,7 @@ \subsection{Grammar module structure}
390392

391393
The GF implementation follows the Codeco implementation, assigning a function
392394
to each grammar rule unless it is too specific to ACE, in which case it
393-
can be implemented as an ACE-only variant. [TODO: improve]
395+
can be implemented as an ACE-only variant.
394396
To correctly implement the ACE syntax, a new ACE-specific resource library
395397
was created. For the most part it borrows all the operators from GF's English
396398
resource library, but overrides certain constructions which in ACE have a
@@ -430,7 +432,7 @@ \subsection{Lexicon}
430432
internal representations of words can be generated using RGL operators.
431433
Table \ref{mapping_acewiki_to_gf} shows the mapping of AceWiki categories
432434
to GF RGL English operators.
433-
[TODO: we have to ignore certain things, e.g. the the-PNs?]
435+
%[TODO: we have to ignore certain things, e.g. the the-PNs?]
434436

435437
\begin{table}
436438
\begin{center}

grammars/acewiki_aceowl/Attempto.gf

-20
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ fun cn_as_VarCN : CN -> VarCN ;
7777
-- Note: in full ACE this must be ThereNP [KK]
7878
fun termNP : Term -> NP ;
7979

80-
-- 2.2.2
81-
8280
-- Relative clause can be attached to both CNs and NPs.
8381
-- relCN provides relative clauses in constructs like
8482
-- `which woman who ...` and `for every woman who ...`
@@ -104,25 +102,17 @@ fun which_RP : RP ;
104102
-- e.g. ((dog of X) of X), most of which ACE does not allow. [KK]
105103
fun ofCN : CN -> NP -> VarCN ;
106104

107-
-- 2.3.1
108-
109105
fun vpS : NP -> VP -> SimpleS ;
110106
fun neg_vpS : NP -> VP -> SimpleS ;
111107

112108
fun v2VP : V2 -> NP -> VP ;
113109

114-
-- 2.3.2 [JJC]
115-
116110
fun a2VP : A2 -> NP -> VP ; -- is mad-about NP
117111

118-
-- 3.2
119-
120112
fun thereNP : ThereNP -> SimpleS ; -- there is/are
121113

122114
fun thereNP_as_NP : ThereNP -> NP ;
123115

124-
-- 3.4.1
125-
126116
fun coordS : Conj -> S -> S -> S ;
127117

128118
fun and_Conj : Conj ;
@@ -136,19 +126,13 @@ fun vp_as_posVPS : VP -> VPS ;
136126
fun vp_as_negVPS : VP -> VPS ;
137127
fun np_coord_VPS : NP -> Conj -> [VPS] -> SimpleS ;
138128

139-
-- 3.4.3
140-
141129
fun for_everyS : VarCN -> S -> S ;
142130

143-
-- 3.4.4
144-
145131
fun if_thenS : S -> S -> S ;
146132
fun falseS : SimpleS -> S ; -- it is false that
147133

148134
fun simpleS_as_S : SimpleS -> S ;
149135

150-
-- 3.5
151-
152136
-- These have been replaced by the more generic function npqQS, which allows
153137
-- for wh-words in the object position of a relative clause as subject
154138
-- e.g. "somebody who is who is a man?"
@@ -168,8 +152,6 @@ fun whichIP : IDet -> VarCN -> IP ;
168152
fun which_IDet : IDet ;
169153
fun whichPl_IDet : IDet ;
170154

171-
-- 4
172-
173155
cat ACEText ;
174156
fun consText : Text -> ACEText -> ACEText ;
175157

@@ -178,8 +160,6 @@ fun baseText : Text -> ACEText ;
178160
fun sText : S -> Text ;
179161
fun qsText : QS -> Text ;
180162

181-
-- more
182-
183163
fun npVP : NP -> VP ; -- is a bank
184164
fun digitsCard : Digits -> Card ; -- 8 banks
185165
fun v2_byVP : V2 -> NP -> VP ; -- is bought by a customer

grammars/acewiki_aceowl/AttemptoI.gf

-28
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ lin apposVarCN cn v = mkCN cn (symb v) ;
7575

7676
lin termNP x = symb (Prelude.ss x.s) ;
7777

78-
-- 2.2.2
79-
8078
lin relCN = mkCN ;
8179
lin relNP = Syntax.mkNP ;
8280
--lin relThereNP = Syntax.mkNP ; [JJC]
@@ -90,23 +88,15 @@ lin slashRS rp np v2 = mkRS (mkRCl rp np v2) ;
9088
lin neg_slashRS rp np v2 = mkRS negativePol (mkRCl rp np v2) ;
9189
lin which_RP = Syntax.which_RP ;
9290

93-
-- 2.2.4
94-
9591
lin ofCN cn np = mkCN cn (Syntax.mkAdv possess_Prep np) ;
9692

97-
-- 2.3.1
98-
9993
lin vpS np vp = mkS (mkCl np vp) ;
10094
lin neg_vpS np vp = mkS negativePol (mkCl np vp) ;
10195

10296
lin v2VP = mkVP ;
10397

104-
-- 2.3.2 [JJC]
105-
10698
lin a2VP = mkVP ; -- is mad-about NP
10799

108-
-- 3.2
109-
110100
lin thereNP np = mkS (mkCl np) ;
111101

112102
-- ThereNP is just a regular NP, we just need it to separate out
@@ -119,26 +109,18 @@ lin cn_as_VarCN = id Syntax.CN ;
119109
lin simpleS_as_S = id Syntax.S ;
120110

121111

122-
-- 3.4.1
123-
124112
lin coordS = mkS ;
125113

126114
lin and_Conj = Syntax.and_Conj ;
127115
lin or_Conj = Syntax.or_Conj ;
128116

129-
-- 3.4.3
130-
131117
lin for_everyS cn = mkS (Syntax.mkAdv for_Prep (Syntax.mkNP every_Det cn)) ;
132118

133-
-- 3.4.4
134-
135119
lin if_thenS = mkS if_then_Conj ;
136120

137121
lin falseS s = mkS (adj_thatCl false_A s) ;
138122

139123

140-
-- 3.5
141-
142124
-- lin ipQS ip vp = mkQS (mkQCl ip vp) ;
143125
-- lin neg_ipQS ip vp = mkQS negativePol (mkQCl ip vp) ;
144126

@@ -152,16 +134,12 @@ lin whichIP = Syntax.mkIP ;
152134
lin which_IDet = Syntax.which_IDet ;
153135
lin whichPl_IDet = Syntax.whichPl_IDet ;
154136

155-
-- 3.6
156-
157137
lin consText = mkText ;
158138
lin baseText t = t ;
159139
lin sText = mkText ;
160140
lin qsText = mkText ;
161141

162142

163-
--- more
164-
165143
lin npVP = mkVP ;
166144
lin digitsCard n = Syntax.mkCard <lin Digits n : Digits> ;
167145
lin v2_byVP v2 np = mkVP (passiveVP v2) (Syntax.mkAdv by8agent_Prep np) ;
@@ -190,12 +168,6 @@ lin v2_byVP v2 np = mkVP (passiveVP v2) (Syntax.mkAdv by8agent_Prep np) ;
190168
lin a2VPQ = a2VP ;
191169
lin v2_byVPQ = v2_byVP ;
192170

193-
-- These functions are language-specific
194-
-- lincat VPSQ = Extra.VPS ;
195-
-- lincat [VPSQ] = Extra.ListVPS ;
196-
-- lin BaseVPSQ = Extra.BaseVPS ;
197-
-- lin ConsVPSQ = Extra.ConsVPS ;
198-
199171
lin vp_as_posVPSQ = vp_as_posVPS ;
200172
lin vp_as_negVPSQ = vp_as_negVPS ;
201173
lin vpq_as_posVPSQ = vp_as_posVPS ;

run-precision-test.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ if [ $# -ge 1 ]; then
3333
fi
3434
fi
3535

36-
echo "Depth: ${depth}"
37-
echo "Parsing into ${out}..."
36+
#echo "Parsing into ${out}..."
3837
egrep ".+" ${trees_file} | tools/Codeco/run.sh 1>${out}
3938

4039
length=`cat ${trees_file} | python tools/length.py | python tools/avg.py`
@@ -44,7 +43,8 @@ parsed=`egrep "^OK:" ${out} | wc --lines`
4443
failed=`egrep "^FAIL:" ${out} | wc --lines`
4544
echo "Parsed: ${parsed}, Failed: ${failed}"
4645
echo "Precision:" $((parsed*100/total))"%"
46+
echo "Depth: ${depth}"
4747
echo "Average length: ${length}"
4848

49-
echo "Creating ${out_fail}"
49+
#echo "Creating ${out_fail}"
5050
egrep "^FAIL:" ${out} | sed "s/^FAIL: //" | sort | uniq > ${out_fail}

0 commit comments

Comments
 (0)