Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
a9a97395
Commit
a9a97395
authored
Jul 31, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: Text tokenizing
parent
d1a9c4ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
controllers.coffee
h/js/controllers.coffee
+1
-0
services.coffee
h/js/services.coffee
+8
-1
No files found.
h/js/controllers.coffee
View file @
a9a97395
...
...
@@ -436,6 +436,7 @@ class Search
$scope
.
search_filter
=
$routeParams
.
matched
heatmap
=
annotator
.
plugins
.
Heatmap
threads
=
[]
text_tokens
=
$routeParams
.
in_body_text
.
split
' '
for
bucket
in
heatmap
.
buckets
for
annotation
in
bucket
thread
=
annotator
.
threading
.
getContainer
annotation
.
id
...
...
h/js/services.coffee
View file @
a9a97395
...
...
@@ -145,6 +145,7 @@ class Hypothesis extends Annotator
if
searchItem
.
attributes
.
category
is
'text'
in_body_text
=
searchItem
.
attributes
.
value
.
toLowerCase
()
text_tokens
=
searchItem
.
attributes
.
value
.
split
' '
if
searchItem
.
attributes
.
category
is
'tag'
tag_search
=
searchItem
.
attributes
.
value
.
toLowerCase
()
...
...
@@ -165,9 +166,15 @@ class Hypothesis extends Annotator
matches
=
false
break
when
'text'
unless
annotation
.
text
?
and
annotation
.
text
.
toLowerCase
().
indexOf
(
value
.
toLowerCase
())
>
-
1
unless
annotation
.
text
?
matches
=
false
break
for
token
in
text_tokens
unless
annotation
.
text
.
toLowerCase
().
indexOf
(
token
.
toLowerCase
())
>
-
1
matches
=
false
break
when
'tag'
unless
annotation
.
tags
?
matches
=
false
...
...
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