How to use the problog.extern.problog_export_nondet function in problog

To help you get started, we’ve selected a few problog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mmxgn / spacy-clausie / problog / clausiepy_pl.py View on Github external
@problog_export_nondet('+str', '-str', '-str', '-str', '-str', '-str', '-str')
def clausie(sent):
    
    sent = remove_apostrophe(sent)
    
    clauses = cl.clausie(sent)
    
    propositions = cl.extract_propositions(clauses)    

    result = []
    for proposition in propositions:
        ptext = cl.proposition_text(proposition)
        
        prop = []
        
        for p in ptext:
            prop.append(" ".join([pp.text for pp in p]))