Commit 2d53ca20 authored by Michal Čihař's avatar Michal Čihař

Separate wordlists

Separate words ignore lists to separate file
parent 09c1975f
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Set of ignored words
IGNORE_WORDS = frozenset([
'a',
'an',
'and',
'are',
'as',
'at',
'be',
'but',
'by',
'for',
'if',
'in',
'into',
'is',
'it',
'no',
'not',
'of',
'on',
'or',
's',
'such',
't',
'that',
'the',
'their',
'then',
'there',
'these',
'they',
'this',
'to',
'was',
'will',
'with',
])
# Set of words to ignore in similar lookup
IGNORE_SIMILAR = frozenset([
'also',
'class',
'href',
'http',
'me',
'most',
'net',
'per',
'span',
'their',
'theirs',
'you',
'your',
'yours',
'www',
]) | IGNORE_WORDS
......@@ -36,64 +36,7 @@ from weblate.trans.util import (
)
from weblate.trans.search import FULLTEXT_INDEX, SOURCE_SCHEMA, TARGET_SCHEMA
# Set of ignored words
IGNORE_WORDS = frozenset([
'a',
'an',
'and',
'are',
'as',
'at',
'be',
'but',
'by',
'for',
'if',
'in',
'into',
'is',
'it',
'no',
'not',
'of',
'on',
'or',
's',
'such',
't',
'that',
'the',
'their',
'then',
'there',
'these',
'they',
'this',
'to',
'was',
'will',
'with',
])
# Set of words to ignore in similar lookup
IGNORE_SIMILAR = frozenset([
'also',
'class',
'href',
'http',
'me',
'most',
'net',
'per',
'span',
'their',
'theirs',
'you',
'your',
'yours',
'www',
]) | IGNORE_WORDS
from weblate.trans.data import IGNORE_WORDS, IGNORE_SIMILAR
class ProjectManager(models.Manager):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment