multilingual-ctap-feature/src/main/java/com/ctapweb/feature/util/PortugueseWordCategories.java
public boolean isMesoclitic(String form) {
        // pattern: verb-[optional 2nd clitic]-(required clitic)-(inflection)
        Pattern p = Pattern.compile("\\w+-(?:\\w{1,4}-)?(\\w{1,4})-(\\w{1,5})", Pattern.CASE_INSENSITIVE);
        Matcher m = p.matcher(form);
        return m.find()
                && (Arrays.asList(cliticForms).contains(m.group(1)))
                && (Arrays.asList(mesoInfl).contains(m.group(2)));
    }
// surface form may not be split, so clitics often remain attached to host and verb may not be identified/tagged
surface form may not be split, so clitics often remain attached to host and verb may not be identified/tagged
surface form may not be split so clitics often remain attached to host and verb may not be identified / tagged
public boolean isMesoclitic(String form) {
        Pattern p = Pattern.compile("\\w+-(?:\\w{1,4}-)?(\\w{1,4})-(\\w{1,5})", Pattern.CASE_INSENSITIVE);
        Matcher m = p.matcher(form);
        return m.find()
                && (Arrays.asList(cliticForms).contains(m.group(1)))
                && (Arrays.asList(mesoInfl).contains(m.group(2)));
    }
public boolean isMesoclitic ( String form ) { Pattern p = Pattern . compile ( "\\w+-(?:\\w{1,4}-)?(\\w{1,4})-(\\w{1,5})" , Pattern . CASE_INSENSITIVE ) ; Matcher m = p . matcher ( form ) ; return m . find ( ) && ( Arrays . asList ( cliticForms ) . contains ( m . group ( 1 ) ) ) && ( Arrays . asList ( mesoInfl ) . contains ( m . group ( 2 ) ) ) ; }
surface form may not be split, so clitics often remain attached to host and verb may not be identified/tagged
surface form may not be split so clitics often remain attached to host and verb may not be identified / tagged
// pattern: verb-[optional 2nd clitic]-(required clitic)-(inflection)