Ejemplo n.º 1
0
 def Init(self):
     BoeLmC.Init(self)
     self.DocTextDir = ""
     self.ObjCenter = FbObjCacheCenterC()
     self.CtfCenter = TermCtfC()
     self.lInferenceWeight = [1,0,0]
     self.hDocText = {}
Ejemplo n.º 2
0
 def Init(self):
     cxBaseC.Init(self)
     
     self.ObjCenter = FbObjCacheCenterC()
     self.Inferener = LESInferencerC()
     self.DocKgDir = ""
     self.hQObj = {}
     self.OrigQWeight = 0.5
Ejemplo n.º 3
0
    def Init(self):
        cxBaseC.Init(self)

        self.Searcher = IndriSearchCenterC()
        self.ObjCenter = FbObjCacheCenterC()
        self.Evaluator = AdhocEvaC()

        self.Inferener = LESInferencerC()

        self.QDocNodeDataDir = ""
        self.OrigQWeight = 0.5
        self.UseQObjOnly = True
Ejemplo n.º 4
0
    def Init(self):
        cxBaseC.Init(self)

        self.NodeDir = ""

        self.Searcher = IndriSearchCenterC()
        self.ObjCenter = FbObjCacheCenterC()

        self.QDocFeatureExtractor = LeToRFeatureExtractCenterC()
        self.QObjFeatureExtractor = FbQObjFeatureExtractCenterC()
        self.DocObjFeatureExtractor = FbObjDocFeatureExtractCenterC()
        self.ObjObjFeatureExtractor = ObjObjFeatureExtractCenterC()
Ejemplo n.º 5
0
    def Init(self):
        cxBaseC.Init(self)

        self.lQObjFeatureGroup = []
        self.lObjObjFeatureGroup = []
        self.lDocObjFeatureGroup = []

        self.QObjAnaExtractor = QueryObjEdgeFeatureAnaExtractorC()
        self.DocObjFaccExtractor = DocObjEdgeFeatureFaccExtractorC()
        self.ObjObjKGExtractor = ObjObjEdgeFeatureKGExtractorC()
        self.ObjObjPreCalcExtractor = ObjObjEdgeFeaturePreCalcSimExtractorC()
        self.ObjObjTextSimExtractor = ObjObjEdgeFeatureTextSimExtractorC()

        self.Searcher = IndriSearchCenterC()
        self.ObjCenter = FbObjCacheCenterC()
        self.NodeDir = ""
import site

site.addsitedir('/bos/usr0/cx/PyCode/cxPyLib')
site.addsitedir('/bos/usr0/cx/PyCode/GoogleAPI')

from ObjCenter.FbObjCacheCenter import FbObjCacheCenterC
from cxBase.Conf import cxConfC
import sys

if 2 != len(sys.argv):
    FbObjCacheCenterC.ShowConf()
    print "in\nout"
    sys.exit()

ObjCenter = FbObjCacheCenterC(sys.argv[1])
conf = cxConfC(sys.argv[1])
InName = conf.GetConf('in')
OutName = conf.GetConf('out')

out = open(OutName, 'w')

cnt = 0
for line in open(InName):
    line = line.strip()
    vCol = line.split('\t')
    lName = [ObjCenter.FetchObjName(ObjId) for ObjId in vCol[:2]]
    print >> out, line + '\t' + '\t'.join(lName)
    cnt += 1
    if 0 == (cnt % 100):
        print "processed [%d] line" % (cnt)
 def Init(self):
     SearchResDocGraphConstructorC.Init(self)
     self.EdgeFeatureCenter = ObjObjFeatureExtractCenterC()
     self.ObjCenter = FbObjCacheCenterC()
Ejemplo n.º 8
0
 def Init(self):
     cxBaseC.Init(self)
     self.Searcher = IndriSearchCenterC()
     self.ObjCenter = FbObjCacheCenterC()
     self.NeighborNum = 50