当前位置: 首页>>代码示例>>Python>>正文


Python Search.get方法代码示例

本文整理汇总了Python中search.Search.get方法的典型用法代码示例。如果您正苦于以下问题:Python Search.get方法的具体用法?Python Search.get怎么用?Python Search.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在search.Search的用法示例。


在下文中一共展示了Search.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: search

# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get [as 别名]
def search(term=''):
    fileConfig('config/logging.conf')
    prop = PropertyUtil('config/application.conf')
    logger = logging.getLogger(__name__)
    topics = None
    json_data = {}
    try:
        logger.info('Term = {0}'.format(term))
        if prop is not None:
            logger.info('Index Name = {0}'.format(prop.elasticSearchIndexName))
            search = Search(prop , logger )
            if term != '':
                data = search.get(term)
                json_data = json.dumps(data)
    except Exception , error:
        logger.error('Exception occurred - {0}'.format(str(error)))
开发者ID:jbgage,项目名称:Portfolio,代码行数:18,代码来源:app.py

示例2: get_tfidf

# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get [as 别名]
def get_tfidf(term):
    fileConfig('config/logging.conf')
    prop = PropertyUtil('config/application.conf')
    logger = logging.getLogger(__name__)
    json_data = {}
    try:
        logger.info('Term = {0}'.format(term))
        if prop is not None:
            logger.info('Index Name = {0}'.format(prop.elasticSearchIndexName))
            search = Search(prop , logger )
            if term != '':
                data = search.get(term)
                if data is not None and len(data) > 0:
                    lingo = LingoClustering(data)
                    json_data = json.dumps(lingo.cluster_label_induction())
    except Exception , error:
        logger.error('Exception occurred - {0}'.format(str(error)))
开发者ID:jbgage,项目名称:Portfolio,代码行数:19,代码来源:app.py

示例3: get_lda

# 需要导入模块: from search import Search [as 别名]
# 或者: from search.Search import get [as 别名]
def get_lda(term):
    fileConfig('config/logging.conf')
    prop = PropertyUtil('config/application.conf')
    logger = logging.getLogger(__name__)
    topics = None
    json_data = {}
    try:
        logger.info('Term = {0}'.format(term))
        if prop is not None:
            logger.info('Index Name = {0}'.format(prop.elasticSearchIndexName))
            search = Search(prop , logger )
            if term != '':
                data = search.get(term)
                if data is not None and len(data) > 0:
                    topics = TopicAnalyzer(data , logger)
                    json_data = topics.get_lda()
    except Exception , error:
        logger.error('Exception occurred - {0}'.format(str(error)))
开发者ID:jbgage,项目名称:Portfolio,代码行数:20,代码来源:app.py


注:本文中的search.Search.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。