Ejemplo n.º 1
0
        for twitter status, for generic feature extraction (used on queries), for entity linking expansion.
        e.g. R-0.2-100-....-terms.bigrams-terms-surfaceForms
    [query numbers divided by :]
"""


import sys, errno, os

from CipCipPy.utils.io import readQueries, readQrels
from CipCipPy.filtering import SupervisedFilterer
from CipCipPy.classification import *
from CipCipPy.classification.feature import *

#FIXME use argparse

queries = readQueries(sys.argv[1])

with open(sys.argv[2]) as ann_qfile:
    queriesAnnotated = json.load(ann_qfile)

if len(sys.argv) > 8:
    queries = [q for q in queries if q[0] in set(sys.argv[8].split(':'))]

qrels = readQrels(sys.argv[3], set(q[0] for q in queries))
dataset_path = sys.argv[4]
resultsPath = sys.argv[5]

external = False
if sys.argv[6] == 'external':
    external = True
Ejemplo n.º 2
0
        minimum link probability, feature extraction function names (divided by .)
        for twitter status, for generic feature extraction (used on queries), for entity linking expansion.
        e.g. R-0.2-100-....-terms.bigrams-terms-surfaceForms
    [query numbers divided by :]
"""

import sys, errno, os

from CipCipPy.utils.io import readQueries, readQrels
from CipCipPy.filtering import SupervisedFilterer
from CipCipPy.classification import *
from CipCipPy.classification.feature import *

#FIXME use argparse

queries = readQueries(sys.argv[1])

with open(sys.argv[2]) as ann_qfile:
    queriesAnnotated = json.load(ann_qfile)

if len(sys.argv) > 8:
    queries = [q for q in queries if q[0] in set(sys.argv[8].split(':'))]

qrels = readQrels(sys.argv[3], set(q[0] for q in queries))
dataset_path = sys.argv[4]
resultsPath = sys.argv[5]

external = False
if sys.argv[6] == 'external':
    external = True