-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c3ce79
commit 59032e1
Showing
4 changed files
with
290 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import json | ||
from ontolearn.lp_generator import LPGen | ||
|
||
PATH_FAMILY = 'KGs/Family/family-benchmark_rich_background.owl' | ||
STORAGE_PATH = 'Family_LPs' | ||
|
||
def generate_lps(): | ||
lp_gen = LPGen(kb_path=PATH_FAMILY, storage_path=STORAGE_PATH, rho_name="ELRefinement", max_num_lps=500) # max_num_lps is the maximum number of concepts you will generate. | ||
lp_gen.generate() | ||
with open(f"{STORAGE_PATH}/LPs.json") as file: | ||
lps = json.load(file) | ||
print("Number of learning problems:", len(lps)) | ||
print(f"Leaning problems stored at {STORAGE_PATH}") | ||
|
||
if __name__ == '__main__': | ||
generate_lps() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters