def cluster_controller():
    search_term = request.values.get('term')
    if search_term is None:
        return 'Search term is a required parameter'
    print search_term
    cluster = TextCluster()
    html_text = cluster.get_clusters(search_term)
    return html_text
Example #2
0
import os
import time

import WordFrequencyCloud as pc
from TextCluster import TextCluster

tc = TextCluster()

tc.do_kMeans("G:\\Nikhil\\MS\\MS_SEM3\\239\\project\\data")
exit(0)
"""

sp = SearchProcessor()
sp.do_word_frequency_cloud('jaguar')
exit(0)
word_freq_tup_list = []
word_freq_tup_list.append(('nikhil', 5))
word_freq_tup_list.append(('rocky', 8))
word_freq_tup_list.append(('arnold', 10))
word_freq_tup_list.append(('ranbir', 1))
# tags = make_tags(word_freq_tup_list)

# print tags

# exit(0)
"""

path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'templates', 'template.html'))
f = file(path)
print f.name
list_template = '<li>%(item)s</li>'