On 7 April 2014 11:08, Mike Unwalla <m...@techscribe.co.uk> wrote: > Thanks Dave. > > I am not an XML expert. I understand the phrase 'define a transform' to > mean 'specify a mapping'. If my understanding is not correct, please tell > me.
That's right. As a trial, if you give me a few examples, and how you want these in the output, we can start from there. > > There is not a 1:1 mapping between the term checker postags and the LT > postags. Thus, I cannot define a transform for all the postags, but I can > define a transform for some of them. However, there are possible problems as > the examples below show. I need the XML source markup (is the source XML?) XSLT works on XML in and XML out. > > Example 1. Ignoring technical verbs that LT does not 'know', a verb that has > the postag STE_VERB_LEXICAL_BASE usually has the LT postag VB. However, > although the verb 'do' has the LT postag VB, it does not have the postag > STE_VERB_LEXICAL_BASE. (It has the postags STE_VERB_AUXILIARY_DO and > STE_VERB_AUXILIARY_CAN_DO_MUST_WILL.) Thus, without excluding 'do' from a > rule, you cannot map STE_VERB_LEXICAL_BASE to VB. I'm not sure I understand this... If you can express the conditions, then I can write a transform based on those conditions. E.g. (guessing) input <STE_VERB_LEXICAL_BASE> -> <VB> input <do> -> <VB> Although that sounds too simple? > > Example 2. With an approved 2-word plural noun, the first word has the > postag STE_TN_NOUN_MULTI_WORD_PLURAL_1 and the second word has the postag > STE_TN_NOUN_MULTI_WORD_PLURAL_2. (TN is an abbreviation of 'Technical Name', > which is a term from the STE specification.) The 3 terms that follow are > approved 2-word nouns. The LT postags that relate to nouns are different for > the first word. The LT postags for nouns are in brackets: > circuit breakers (NN, NNS) > duty cycles (NN:UN, NNS) > operating systems (-, NNS) <STE_TN_NOUN_MULTI_WORD_PLURAL_1> + <STE_TN_NOUN_MULTI_WORD_PLURAL_2> (written as <xsl:template match="STE_TN_NOUN_MULTI_WORD_PLURAL_1[following-sibling::STE_TN_NOUN_MULTI_WORD_PLURAL_2[1]] "> then maps to ... Again I do not understand the English explanation, perhaps an XML example? "following terms" - are these XML children (nested within the parent) or siblings? <p> <child/> </p> <sibling/> regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees_APR _______________________________________________ Languagetool-devel mailing list Languagetool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-devel