Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
20965dbb
Commit
20965dbb
authored
Mar 23, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ignore list for similar lookup
parent
26f2abfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
trans/managers.py
trans/managers.py
+1
-1
No files found.
trans/managers.py
View file @
20965dbb
...
...
@@ -208,7 +208,7 @@ class UnitManager(models.Manager):
ret
=
set
([
unit
.
checksum
])
with
trans
.
search
.
get_source_searcher
()
as
searcher
:
# Extract up to 10 terms from the source
terms
=
[
kw
for
kw
,
score
in
searcher
.
key_terms_from_text
(
'source'
,
unit
.
source
,
numterms
=
10
)]
terms
=
[
kw
for
kw
,
score
in
searcher
.
key_terms_from_text
(
'source'
,
unit
.
source
,
numterms
=
10
)
if
not
kw
in
IGNORE_SIMILAR
]
cnt
=
len
(
terms
)
# Try to find 10 similar string, remove up to 4 words
while
len
(
ret
)
<
10
and
cnt
>
0
and
len
(
terms
)
-
cnt
<
4
:
...
...
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