Révision 2152
tmp/org.txm.analec.rcp/src/org/txm/macro/urs/DemoMacro.groovy (revision 2152) | ||
---|---|---|
114 | 114 |
def maximum_schema_size = 10; |
115 | 115 |
def schema_ursql = "SEXEMPLE" |
116 | 116 |
def unit_ursql = "EXEMPLE@PEXEMPLE=oui" |
117 |
def unit_type = "EXEMPLE" |
|
117 | 118 |
println AnalecUtils.selectSchemasInCorpus(debug, analecCorpus, corpus, schema_ursql, minimum_schema_size, maximum_schema_size, strict_inclusion) |
118 | 119 |
|
119 | 120 |
|
120 | 121 |
// with URSQL |
121 |
println AnalecUtils.filterElements(debug, analecCorpus.getUnites("EXEMPLE"), unit_ursql)
|
|
122 |
println AnalecUtils.filterElements(debug, analecCorpus.getUnites(unit_type), unit_ursql)
|
|
122 | 123 |
|
123 | 124 |
// with intersection with CQP corpus matches |
124 |
AnalecUtils.filterUniteByInclusion(debug, analecCorpus.getUnites("EXEMPLE"), corpus.getMatches(), strict_inclusion, position)
|
|
125 |
println AnalecUtils.filterUniteByInclusion(debug, analecCorpus.getUnites(unit_type), corpus.getMatches(), strict_inclusion, position)
|
|
125 | 126 |
|
126 | 127 |
// by size |
127 |
AnalecUtils.filterBySize(analecCorpus.getSchemas("SEXEMPLE"), minimum_schema_size, maximum_schema_size)
|
|
128 |
println AnalecUtils.filterBySize(analecCorpus.getSchemas(schema_ursql), minimum_schema_size, maximum_schema_size)
|
|
128 | 129 |
|
129 | 130 |
// Delete annotations |
130 | 131 |
|
131 | 132 |
analecCorpus.supUnite(u) |
132 |
//analecCorpus.supRelation(rel) |
|
133 |
//analecCorpus.supSchema(sch) |
|
133 |
analecCorpus.supUnite(u2) |
|
134 |
analecCorpus.supRelation(relation) |
|
135 |
analecCorpus.supSchema(schema) |
|
134 | 136 |
|
135 | 137 |
// Delete annotation value |
136 | 138 |
|
... | ... | |
140 | 142 |
// Delete annotation property |
141 | 143 |
|
142 | 144 |
structure.supprimerProp(Unite.class, "EXEMPLE", "PEXEMPLE") |
145 |
structure.supprimerProp(Relation.class, "REXEMPLE", "PEXEMPLE") |
|
146 |
structure.supprimerProp(Schema.class, "SEXEMPLE", "PEXEMPLE") |
|
143 | 147 |
|
144 | 148 |
// Delete annotation type |
145 | 149 |
|
146 | 150 |
structure.supprimerType(Unite.class, "EXEMPLE"); |
147 |
//structure.supprimerType(Relation.class, "EXEMPLE");
|
|
148 |
//structure.supprimerType(Schema.class, "EXEMPLE");
|
|
151 |
structure.supprimerType(Relation.class, "REXEMPLE");
|
|
152 |
structure.supprimerType(Schema.class, "SEXEMPLE");
|
|
149 | 153 |
|
150 | 154 |
// Revert changes |
151 | 155 |
|
Formats disponibles : Unified diff