diff --git a/src/Errors.hs b/src/Errors.hs index 0b6b0a9..8cd22c0 100644 --- a/src/Errors.hs +++ b/src/Errors.hs @@ -39,7 +39,7 @@ error2morphosynPattern e = (morphosynUDPattern p1,morphosynUDPattern p2) -- | Shorthand to convert errors to universal morphosyntactic error patterns error2uniMorphosynPattern :: Error -> ErrorPattern error2uniMorphosynPattern e = - (uniMorphosynUDPattern p1,uniMorphosynUDPattern p2) + (uMorphosynUDPattern p1,uMorphosynUDPattern p2) where (p1,p2) = error2Pattern e -- | Show an error pattern as a single "L1-L2" pattern ({A -> B} syntax) diff --git a/src/Extract.hs b/src/Extract.hs index d2413e1..c0e9694 100644 --- a/src/Extract.hs +++ b/src/Extract.hs @@ -35,5 +35,5 @@ correct (s1,s2) = prUDTreeString s1 == prUDTreeString s2 -- NOTE on implementation: the hacky way I implemented this is to compare the -- corresponding simplified (cf. simplifyUDPattern) UD patterns in HST morphosynCorrect :: Alignment -> Bool -morphosynCorrect (s1,s2) = morphosynUDPattern t1 == morphosynUDPattern t2 +morphosynCorrect (s1,s2) = uMorphosynUDPattern t1 == uMorphosynUDPattern t2 where (t1,t2) = (udTree2udPattern s1,udTree2udPattern s2) \ No newline at end of file diff --git a/src/Utils/UDPatterns.hs b/src/Utils/UDPatterns.hs index 518a334..1913d78 100644 --- a/src/Utils/UDPatterns.hs +++ b/src/Utils/UDPatterns.hs @@ -79,8 +79,8 @@ morphosynUDPattern = simplifyUDPattern morphosynFields -- | Shorthand for getting the "universal" morphosyntactic (POS + FEATS + -- DEPREL) UD pattern corresponding to a "full" UD pattern -uniMorphosynUDPattern :: UDPattern -> UDPattern -uniMorphosynUDPattern = simplifyUDPattern (morphosynFields \\ ["XPOS"]) +uMorphosynUDPattern :: UDPattern -> UDPattern +uMorphosynUDPattern = simplifyUDPattern (morphosynFields \\ ["XPOS"]) -- | Remove the parts of a tree not described by a certain UDPattern pruneUDTree :: UDPattern -> UDTree -> UDTree