Skip to content

Mayo42/amie-rule-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMIE Rule Wrapper

A wrapper which wraps AMIE rules into a more intuitive data structure.

Installation as editable package via pip

Clone this repository and cd into it. Then:

$ python3 -m pip install -r requirements.txt
$ python3 -m pip install -e .

Python Files

amie_rule_wrapper.py

This module contains classes which allow to wrap rules from AMIE standard output into an object oriented data structure.

Example usage:

from amie_rule_wrapper import AMIERule, NoAMIERuleInLineError

amie_rules = set()

with open(amie_output_fn, "r") as f:
    lines = f.readlines()
    for line in lines:
        try:
            amie_rule = AMIERule(line)
            amie_rules.add(amie_rule)
        except NoAMIERuleInLineError:
            continue

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages