def TopicIndex():
    core = TermiteCore(request, response)
    lda = LDA(request)
    topicIndex, topicMaxCount = lda.GetTopicIndex()
    return core.GenerateResponse(
        lda.params, {
            'topicCount': len(topicIndex),
            'topicMaxCount': topicMaxCount,
            'TopicIndex': topicIndex
        })
def TermIndex():
    core = TermiteCore(request, response)
    lda = LDA(request)
    termIndex, termMaxCount = lda.GetTermIndex()
    return core.GenerateResponse(
        lda.params, {
            'termCount': len(termIndex),
            'termMaxCount': termMaxCount,
            'TermIndex': termIndex
        })
def DocIndex():
    core = TermiteCore(request, response)
    lda = LDA(request)
    docIndex, docMaxCount = lda.GetDocIndex()
    return core.GenerateResponse(
        lda.params, {
            'docCount': len(docIndex),
            'docMaxCount': docMaxCount,
            'DocIndex': docIndex
        })
示例#4
0
def index():
    core = TermiteCore(request, response)
    return core.GenerateResponse({
        'js_files': [
            "js/TermTopicMatrix/CoreModel.js",
            "js/TermTopicMatrix/CoreView.js",
            "js/TermTopicMatrix/MatrixState.js",
            "js/TermTopicMatrix/MatrixModel.js",
            "js/TermTopicMatrix/MatrixModel_Precomputations.js",
            "js/TermTopicMatrix/MatrixModel_Visibilities.js",
            "js/TermTopicMatrix/MatrixModel_Styles.js",
            "js/TermTopicMatrix/MatrixModel_Values.js",
            "js/TermTopicMatrix/MatrixModel_Positions.js",
            "js/TermTopicMatrix/MatrixModel_AnnotationControls.js",
            "js/TermTopicMatrix/MatrixModel_SelectionGroups.js",
            "js/TermTopicMatrix/MatrixInteractions.js",
            "js/TermTopicMatrix/MatrixView.js",
            "js/TermTopicMatrix/MatrixSelections.js"
        ],
        'css_files': ["css/TermTopicMatrix.css"],
        'visualization':
        'TermTopicMatrix'
    })
示例#5
0
def index():
    core = TermiteCore(request, response)
    corpus = Corpus(request)
    return core.GenerateResponse(corpus.params)
示例#6
0
def TermCoFreqs():
    core = TermiteCore(request, response)
    corpus = Corpus(request)
    termCoFreqs = corpus.GetTermCoFreqs()
    return core.GenerateResponse(corpus.params, {'TermCoFreqs': termCoFreqs})
示例#7
0
def DocMeta():
    core = TermiteCore(request, response)
    corpus = Corpus(request)
    results = corpus.GetDocMeta()
    return core.GenerateResponse(corpus.params, results)
示例#8
0
def index():
    core = TermiteCore(request, response)
    return core.GenerateResponse()
def TopicCooccurrence():
    core = TermiteCore(request, response)
    lda = LDA(request)
    topicCooccurrence = lda.GetTopicCooccurrence()
    return core.GenerateResponse(lda.params,
                                 {'TopicCooccurrence': topicCooccurrence})
示例#10
0
def index():
    core = TermiteCore(request, response)
    lda = LDA(request)
    return core.GenerateResponse(lda.params)