Exemplo n.º 1
0
def test_negation_with_punct3():
    miner = StatusMiner(rules=[(r'c\s*/\s*o', 'negn', 3)])
    assert len(miner.mine('pt c/o', 0)) == 1
    assert len(miner.mine('pt c / o', 0)) == 1
Exemplo n.º 2
0
def test_statusminer_hypothetical():
    s = StatusMiner()
    negations = s.mine('if he wants to', 0)
    assert len(negations) == 1
Exemplo n.º 3
0
def test_negation_with_punct2():
    miner = StatusMiner(rules=[('c / o', 'negn', 3)])
    assert len(miner.mine('pt c/o', 0)) == 0
    assert len(miner.mine('pt c / o', 0)) == 1
Exemplo n.º 4
0
def test_statusminer_negated():
    s = StatusMiner()
    negations = s.mine('no evidence of anything', 0)
    assert len(negations) == 1