Beispiel #1
0
			cp.index(a)
		except:
			pass


	print "indexing: " , time.time() - s


	q = QueryHandler(debug=False, db=db, use_lua=True)
	q2 = QueryHandler(debug=False, db=db, use_lua=False)

	
	qs = ["ακόρεστο θηλυκό", "ευάλωτη παρθένα", "ξέσπασα ολόλευκος", "κάμπος ανθισμένος"] # lol

	s = time.time()
	'''for i in qs:
		q.process_query(i)
	print "q " , time.time() - s

	s = time.time()
	for i in qs:
		q2.process_query(i)
	print "q2 " , time.time() - s'''



	for i in qs:
		a = q.process_query(i)
		b = q2.process_query(i)
		print a, b
Beispiel #2
0
	s = time.time()
	for a in articles:

		cp.index(a)


	print "indexing: " , time.time() - s

	
	q = QueryHandler(debug=False, db=db, use_lua=True)
	q2 = QueryHandler(debug=False, db=db, use_lua=False)

	s = time.time()

	q.process_query("the brown")
	q.process_query("Den raske brune")
	q.process_query("Den hurtige brune ræv")
	q.process_query("Быстрая коричневая лиса")
	q.process_query("Den raske brune")
	q.process_query("De snelle bruine")
	q.process_query("Nopea ruskea kettu hyppää")

	q.process_query("Le rapide renard brun saute")
	q.process_query("Der schnelle braune Fuchs")
	q.process_query("A gyors barna róka átugorja a lusta kutyát")
	q.process_query("veloce salta sul")
	q.process_query("raposa marrom ataca")
	q.process_query("zorro marrón salta")
	q.process_query("brun räv hoppar över")
	q.process_query("kahverengi tilki tembel köpeğin")
Beispiel #3
0
    cp = CorpusHandler(debug=False, db=db)
    cp.drop()

    s = time.time()
    for a in articles:

        cp.index(a)

    print "indexing: ", time.time() - s

    q = QueryHandler(debug=False, db=db, use_lua=True)
    q2 = QueryHandler(debug=False, db=db, use_lua=False)

    s = time.time()

    q.process_query("the brown")
    q.process_query("Den raske brune")
    q.process_query("Den hurtige brune ræv")
    q.process_query("Быстрая коричневая лиса")
    q.process_query("Den raske brune")
    q.process_query("De snelle bruine")
    q.process_query("Nopea ruskea kettu hyppää")

    q.process_query("Le rapide renard brun saute")
    q.process_query("Der schnelle braune Fuchs")
    q.process_query("A gyors barna róka átugorja a lusta kutyát")
    q.process_query("veloce salta sul")
    q.process_query("raposa marrom ataca")
    q.process_query("zorro marrón salta")
    q.process_query("brun räv hoppar över")
    q.process_query("kahverengi tilki tembel köpeğin")