# Path: nordlys/config.py
# DATA_DIR = path.dirname(path.dirname(path.abspath(__file__))) + "/data"
# 
# Path: nordlys/storage/surfaceforms.py
# class SurfaceForms(object):
# 
#     def __init__(self, collection):
#         self.collection = collection
#         self.mongo = Mongo(MONGO_HOST, MONGO_DB, self.collection)
# 
#     def get(self, surface_form):
#         """Returns all information associated with a surface form."""
# 
#         # need to unescape the keys in the value part
#         mdoc = self.mongo.find_by_id(surface_form)
#         if mdoc is None:
#             return None
#         doc = {}
#         for f in mdoc:
#             if f != Mongo.ID_FIELD:
#                 doc[f] = {}
#                 for key, value in mdoc[f].iteritems():
#                     doc[f][Mongo.unescape(key)] = value
# 
#         return doc


from nordlys.config import DATA_DIR
from nordlys.storage.surfaceforms import SurfaceForms
"""
Configurations for tagme package.

@author: Faegheh Hasibi (faegheh.hasibi@idi.ntnu.no)
"""



# Test collection files
Y_ERD = DATA_DIR + "/Y-ERD.tsv"

ERD_QUERY = DATA_DIR + "/Trec_beta.query.txt"
ERD_ANNOTATION = DATA_DIR + "/Trec_beta.annotation.txt"

WIKI_ANNOT30 = DATA_DIR + "/wiki-annot30"
WIKI_ANNOT30_SNIPPET = DATA_DIR + "/wiki-annot30-snippet.txt"

# Path: nordlys/config.py
# DATA_DIR = path.dirname(path.dirname(path.abspath(__file__))) + "/data"
# 
# Path: nordlys/storage/surfaceforms.py
# class SurfaceForms(object):
# 
#     def __init__(self, collection):
#         self.collection = collection
#         self.mongo = Mongo(MONGO_HOST, MONGO_DB, self.collection)
# 
#     def get(self, surface_form):
#         """Returns all information associated with a surface form."""
# 
#         # need to unescape the keys in the value part
#         mdoc = self.mongo.find_by_id(surface_form)
#         if mdoc is None:
#             return None
#         doc = {}
#         for f in mdoc:
#             if f != Mongo.ID_FIELD:
#                 doc[f] = {}
#                 for key, value in mdoc[f].iteritems():
#                     doc[f][Mongo.unescape(key)] = value
# 
#         return doc


# Path: nordlys/tagme/config.py
from nordlys.config import DATA_DIR
from nordlys.storage.surfaceforms import SurfaceForms

"""
Configurations for tagme package.

@author: Faegheh Hasibi (faegheh.hasibi@idi.ntnu.no)
"""



# Test collection files
Y_ERD = DATA_DIR + "/Y-ERD.tsv"

ERD_QUERY = DATA_DIR + "/Trec_beta.query.txt"
ERD_ANNOTATION = DATA_DIR + "/Trec_beta.annotation.txt"

WIKI_ANNOT30 = DATA_DIR + "/wiki-annot30"
WIKI_ANNOT30_SNIPPET = DATA_DIR + "/wiki-annot30-snippet.txt"

WIKI_ANNOT30_ANNOTATION = DATA_DIR + "/wiki-annot30-annotation.txt"