Commit 9e8210f4 by Sartika Aritonang

Upload File

parent 5cb996bb
from django.shortcuts import render
from django.http import HttpResponse
from news_site.proximity import proximity
# Create your views here.
# def index(request):
# return HttpResponse("Hello, world. You're at the polls index.")
def home(request):
return render(request, 'index.html')
def result(request):
return render(request, 'result.html')
def simulator_data(request):
return render(request, 'simulator_data.html')
def simulator_kueri(request):
return render(request, 'simulator_kueri.html')
def result_next(request):
return render(request, 'resutl_next.html')
def result(request):
global content
if request.method == 'POST':
query = request.POST['querysearch']
proximitys = proximity.results(query)
content={'proximitys': proximitys, 'query':query}
return render(request, 'result.html', content)
def result_next(request):
content
return render(request, 'result_next.html', content)
def simulator_data(request):
read_xml = proximity.parse_xml()
tokenize = proximity.get_token(read_xml)
stopword_removal = proximity.stopwordRemove(tokenize)
number_removal = proximity.numberRemove(stopword_removal)
stemming = proximity.stemming(number_removal)
#indexing = proximity.createIndex(read_xml, stemming)
indexing = proximity.open_indexing()
contents={'read_xml': read_xml, 'tokenize': tokenize, 'stopword_removal' : stopword_removal, 'number_removal' : number_removal, 'stemming' : stemming, 'indexing' : indexing}
return render(request, 'simulator_data.html', contents)
def simulator_kueri(request):
content
return render(request, 'simulator_kueri.html', content)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment