team4alfanous team mailing list archive
-
team4alfanous team
-
Mailing list archive
-
Message #00352
[Branch ~team4alfanous/alfanous/alfanous-git] Rev 540: lower the level of derivation in fuzzy search
------------------------------------------------------------
revno: 540
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Wed 2013-01-09 01:32:17 +0100
message:
lower the level of derivation in fuzzy search
& activate fuzzy search as default in minimal view
modified:
src/alfanous/Outputs.py
src/alfanous/QueryProcessing.py
--
lp:alfanous
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git
Your team Alfanous team is subscribed to branch lp:alfanous.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous/Outputs.py'
--- src/alfanous/Outputs.py 2013-01-07 08:38:10 +0000
+++ src/alfanous/Outputs.py 2013-01-09 00:32:17 +0000
@@ -433,6 +433,8 @@
# pre-defined views
if view == "minimal":
+ fuzzy = True
+ #page = 25
vocalized = False
recitation = None
translation = None
=== modified file 'src/alfanous/QueryProcessing.py'
--- src/alfanous/QueryProcessing.py 2012-12-25 04:16:11 +0000
+++ src/alfanous/QueryProcessing.py 2013-01-09 00:32:17 +0000
@@ -632,7 +632,7 @@
def pipeline( self, fieldname, text ):
words = set()
words |= set( QuranicParser.Synonyms( fieldname, text ).words )
- words |= set( QuranicParser.Derivation( fieldname, text, level = 2 ).words )
+ words |= set( QuranicParser.Derivation( fieldname, text, level = 1 ).words )
return list( words )
@@ -813,7 +813,7 @@
def pipeline( self, fieldname, text ):
words = set()
words |= set( QuranicParser.Synonyms( fieldname, text ).words )
- words |= set( QuranicParser.Derivation( fieldname, text, level = 2 ).words )
+ words |= set( QuranicParser.Derivation( fieldname, text, level = 1 ).words )
if len( words ) == 1:
wildcarded_text = " ".join( map( lambda x: "*" + x + "*", text.split( " " ) ) )
words |= set( QuranicParser.Wildcard( fieldname, wildcarded_text ).words )
@@ -846,11 +846,9 @@
def make_term( self, fieldname, text ):
- print ">>3#"
return self._make( "make_term", fieldname, text )
def make_range( self, fieldname, start, end, startexcl, endexcl ):
- print ">>4#"
return self._make( "make_range", fieldname, start, end,
startexcl, endexcl )