Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Cloogle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cloogle
Cloogle
Commits
7563b05f
Verified
Commit
7563b05f
authored
Nov 21, 2018
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly compute ngram ratios for queries with less than NGRAM_N characters
parent
8e4856c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Cloogle/DB.icl
Cloogle/DB.icl
+2
-2
No files found.
Cloogle/DB.icl
View file @
7563b05f
...
...
@@ -394,12 +394,12 @@ where
#
rn
=
toReal
n
#
annots
=
[
MatchingNGramsQuery
(
rn
/
qsize
)
,
MatchingNGramsResult
(
rn
/
toReal
(
length
$
'
NGrams
'.
ngrams
NGRAMS_CI
NGRAMS_N
name
))
,
MatchingNGramsResult
(
rn
/
toReal
(
max
1
$
length
$
'
NGrams
'.
ngrams
NGRAMS_CI
NGRAMS_N
name
))
]
=
((
idx
,
annots
),
db
)
cs
=
[
c
\\
c
<-:
s
]
qsize
=
toReal
$
length
$
'
NGrams
'.
ngrams
NGRAMS_CI
NGRAMS_N
s
qsize
=
toReal
$
max
1
$
length
$
'
NGrams
'.
ngrams
NGRAMS_CI
NGRAMS_N
s
syntaxSearch
::
CloogleEntry
->
(
Bool
,
[
a
])
syntaxSearch
(
SyntaxEntry
se
)
=
(
any
(
not
o
isEmpty
o
flip
match
cs
)
se
.
syntax_patterns
,
[])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment