! Divvun & Giellatekno - open source grammars for Sámi and other languages ! Copyright © 2000-2010 The University of Tromsø & the Norwegian Sámi Parliament ! http://giellatekno.uit.no & http://divvun.no ! ! This program is free software. You can redistribute and/or modify ! this file under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. The GNU General Public License ! is found at http://www.gnu.org/licenses/gpl.html. It is ! also available in the file $GTHOME/LICENSE.txt. ! ! Other licensing options are available upon request, please contact ! giellatekno@hum.uit.no or feedback@divvun.no # This filter removes all strings containing derivational tags # as defined below. # Further, we check that we don't have double passives. # See smX-lex.txt for more documentation. # # The filter should be applied on top of the nonrec transducer. # Insert default compounding tag if there is no compounding tag before the # POS tag, possibly with an intervening OLang/XXX tag in between (the semantic # tag has been removed in an earlier step): # All contexts: block insertion if there is an OLang or a CmpN tag to the left. # First context: nouns, bare POS tag: "+CmpN/SgN" <- [. 0 .] || ! Anchor left context at beginning of the word: [ .#. | %- | %# ] ! ... then followed by anything that is not one of these tags ! essentially blocking addition of default tags after derivations ! that is: lemma symbols until you get to the ... \[ "+CmpN/SgN" | "+CmpN/SgG" | "+CmpN/PlN" | "+CmpN/PlG" | "+CmpN/SgNomLeft" | "+CmpN/SgGenLeft" | "+CmpN/PlGenLeft" ]+ ! ... POS tag: [ "+N" ] _ ! unless followed by any of these tags: \[ "+CmpN/SgN" | "+CmpN/SgG" | "+CmpN/PlN" | "+CmpN/PlG" | "+CmpN/SgNomLeft" | "+CmpN/SgGenLeft" | "+CmpN/PlGenLeft" ]+ ! stopping at the end of the word/lemma [ "+Cmp" | "+Der" | "+Der1" | "+Der2" | "+Der3" | "+Der4" | "+Der5" | .#. | %- | %> | %# ] ! All in all: add default compounding tags only if there is nothing, and never after a derivation. ! Derivations can have their own compounding tags, but they must always be explicitly stated. .o. # Third context: adjectives - always insert CmpN/Attr: "+CmpN/Attr" <- [. 0 .] || [ "+A" | "+PrsPrc" ] _ ; # In all other contexts, there is already a +CmpN/ tag, and thus we do NOT want # to insert the default tag.