def isRuleDecomposable( s_span ):

    srcRuleTerms = s_span.split()
    try:
        term_indx = srcRuleTerms.index('X__1')
        if term_indx >= 2 or (len(srcRuleTerms) - 1 - term_indx) >= 2:
            return True
        else: return False
    except ValueError:
        if srcRuleTerms: return True       # decide for a terminal rule that doesn't have 'X__1'
        else: return False
dataset/ETHPy150Open sfu-natlang/Kriya/src/Kriya-Grammar-Xtrctr/SCFGXtractor_ph1.py/isRuleDecomposable/original