From daf8e4fe98470a4f62b1cc75e9cdaf90efa78678 Mon Sep 17 00:00:00 2001 From: Caleb Levy Date: Wed, 6 May 2020 12:55:53 -0700 Subject: [PATCH 1/2] Update data directories for examples of python interface --- entity-resolution/python/entity-resolution.py | 2 +- friendship/python/friendship.py | 2 +- .../python/knowledge-graph-identification.py | 2 +- simple-acquaintances/python/simple-acquaintances.py | 2 +- social-network-analysis/python/social-network-analysis.py | 2 +- trust-prediction/python/trust-prediction.py | 2 +- user-modeling/python/user-modeling.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/entity-resolution/python/entity-resolution.py b/entity-resolution/python/entity-resolution.py index 22e05051..b8526af8 100755 --- a/entity-resolution/python/entity-resolution.py +++ b/entity-resolution/python/entity-resolution.py @@ -8,7 +8,7 @@ from pslpython.rule import Rule MODEL_NAME = 'entity-resolution' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME) +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/friendship/python/friendship.py b/friendship/python/friendship.py index 9cd138bc..900f893c 100755 --- a/friendship/python/friendship.py +++ b/friendship/python/friendship.py @@ -8,7 +8,7 @@ from pslpython.rule import Rule MODEL_NAME = 'friendship' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME) +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/knowledge-graph-identification/python/knowledge-graph-identification.py b/knowledge-graph-identification/python/knowledge-graph-identification.py index 79450d9a..bbed5882 100755 --- a/knowledge-graph-identification/python/knowledge-graph-identification.py +++ b/knowledge-graph-identification/python/knowledge-graph-identification.py @@ -9,7 +9,7 @@ from pslpython.rule import Rule MODEL_NAME = 'knowledge-graph-identification' -DATA_DIR = os.path.join('..', 'data', 'kgi') +DATA_DIR = os.path.join('..', 'data/kgi/0') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/simple-acquaintances/python/simple-acquaintances.py b/simple-acquaintances/python/simple-acquaintances.py index 5d5feff1..c94f356e 100755 --- a/simple-acquaintances/python/simple-acquaintances.py +++ b/simple-acquaintances/python/simple-acquaintances.py @@ -8,7 +8,7 @@ from pslpython.rule import Rule MODEL_NAME = 'simple-acquaintances' -DATA_DIR = os.path.join('..', 'data') +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/social-network-analysis/python/social-network-analysis.py b/social-network-analysis/python/social-network-analysis.py index 3dcaa727..7e375307 100755 --- a/social-network-analysis/python/social-network-analysis.py +++ b/social-network-analysis/python/social-network-analysis.py @@ -8,7 +8,7 @@ from pslpython.rule import Rule MODEL_NAME = 'social-network-analysis' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME) +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/trust-prediction/python/trust-prediction.py b/trust-prediction/python/trust-prediction.py index 2af1c93e..2458cf93 100755 --- a/trust-prediction/python/trust-prediction.py +++ b/trust-prediction/python/trust-prediction.py @@ -8,7 +8,7 @@ from pslpython.rule import Rule MODEL_NAME = 'trust-prediction' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME) +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/user-modeling/python/user-modeling.py b/user-modeling/python/user-modeling.py index afe11322..8aebdcce 100755 --- a/user-modeling/python/user-modeling.py +++ b/user-modeling/python/user-modeling.py @@ -8,7 +8,7 @@ from pslpython.rule import Rule MODEL_NAME = 'user-modeling' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME) +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' From f96ca10d1d66c54ba78af5ecaca3a8c9cf74bc95 Mon Sep 17 00:00:00 2001 From: Caleb Levy Date: Wed, 6 May 2020 18:31:06 -0700 Subject: [PATCH 2/2] Style updates (make SPLIT constant in python interface) --- citeseer/python/citeseer.py | 3 ++- cora/python/cora.py | 3 ++- entity-resolution/python/entity-resolution.py | 3 ++- friendship/python/friendship.py | 3 ++- .../python/knowledge-graph-identification.py | 4 +++- simple-acquaintances/python/simple-acquaintances.py | 3 ++- social-network-analysis/python/social-network-analysis.py | 3 ++- trust-prediction/python/trust-prediction.py | 3 ++- user-modeling/python/user-modeling.py | 3 ++- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/citeseer/python/citeseer.py b/citeseer/python/citeseer.py index e8bb8f5f..9f55894b 100755 --- a/citeseer/python/citeseer.py +++ b/citeseer/python/citeseer.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'citeseer' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT) ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/cora/python/cora.py b/cora/python/cora.py index c7071f33..f18bda07 100755 --- a/cora/python/cora.py +++ b/cora/python/cora.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'cora' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT) ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/entity-resolution/python/entity-resolution.py b/entity-resolution/python/entity-resolution.py index b8526af8..772b4ec8 100755 --- a/entity-resolution/python/entity-resolution.py +++ b/entity-resolution/python/entity-resolution.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'entity-resolution' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT) ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/friendship/python/friendship.py b/friendship/python/friendship.py index 900f893c..3ef1da62 100755 --- a/friendship/python/friendship.py +++ b/friendship/python/friendship.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'friendship' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT, 'eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/knowledge-graph-identification/python/knowledge-graph-identification.py b/knowledge-graph-identification/python/knowledge-graph-identification.py index bbed5882..332dc198 100755 --- a/knowledge-graph-identification/python/knowledge-graph-identification.py +++ b/knowledge-graph-identification/python/knowledge-graph-identification.py @@ -9,7 +9,9 @@ from pslpython.rule import Rule MODEL_NAME = 'knowledge-graph-identification' -DATA_DIR = os.path.join('..', 'data/kgi/0') +MODEL_SHORT_NAME = 'kgi' +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_SHORT_NAME, SPLIT) ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/simple-acquaintances/python/simple-acquaintances.py b/simple-acquaintances/python/simple-acquaintances.py index c94f356e..1b065fb9 100755 --- a/simple-acquaintances/python/simple-acquaintances.py +++ b/simple-acquaintances/python/simple-acquaintances.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'simple-acquaintances' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT, 'eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/social-network-analysis/python/social-network-analysis.py b/social-network-analysis/python/social-network-analysis.py index 7e375307..de7865cb 100755 --- a/social-network-analysis/python/social-network-analysis.py +++ b/social-network-analysis/python/social-network-analysis.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'social-network-analysis' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT, 'eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/trust-prediction/python/trust-prediction.py b/trust-prediction/python/trust-prediction.py index 2458cf93..2819a621 100755 --- a/trust-prediction/python/trust-prediction.py +++ b/trust-prediction/python/trust-prediction.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'trust-prediction' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT) ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO' diff --git a/user-modeling/python/user-modeling.py b/user-modeling/python/user-modeling.py index 8aebdcce..99428397 100755 --- a/user-modeling/python/user-modeling.py +++ b/user-modeling/python/user-modeling.py @@ -8,7 +8,8 @@ from pslpython.rule import Rule MODEL_NAME = 'user-modeling' -DATA_DIR = os.path.join('..', 'data', MODEL_NAME, '0/eval') +SPLIT = '0' +DATA_DIR = os.path.join('..', 'data', MODEL_NAME, SPLIT, 'eval') ADDITIONAL_PSL_OPTIONS = { 'log4j.threshold': 'INFO'