コード例 #1
0
ファイル: settings_zinnia.py プロジェクト: vnsofthe/iSkyLIMS
COMMENT_MIN_WORDS = getattr(settings, 'ZINNIA_COMMENT_MIN_WORDS', 4)

COMMENT_FLAG_USER_ID = getattr(settings, 'ZINNIA_COMMENT_FLAG_USER_ID', 1)

UPLOAD_TO = getattr(settings, 'ZINNIA_UPLOAD_TO', 'uploads/zinnia')

PROTOCOL = getattr(settings, 'ZINNIA_PROTOCOL', 'http')

FEEDS_FORMAT = getattr(settings, 'ZINNIA_FEEDS_FORMAT', 'rss')
FEEDS_MAX_ITEMS = getattr(settings, 'ZINNIA_FEEDS_MAX_ITEMS', 15)

PINGBACK_CONTENT_LENGTH = getattr(settings,
                                  'ZINNIA_PINGBACK_CONTENT_LENGTH', 300)

SEARCH_FIELDS = getattr(settings, 'ZINNIA_SEARCH_FIELDS',
                        ['title', 'lead', 'content',
                         'excerpt', 'image_caption', 'tags'])

COMPARISON_FIELDS = getattr(settings, 'ZINNIA_COMPARISON_FIELDS',
                            ['title', 'lead', 'content',
                             'excerpt', 'image_caption', 'tags'])

SPAM_CHECKER_BACKENDS = getattr(settings, 'ZINNIA_SPAM_CHECKER_BACKENDS',
                                [])

URL_SHORTENER_BACKEND = getattr(settings, 'ZINNIA_URL_SHORTENER_BACKEND',
                                'zinnia.url_shortener.backends.default')

STOP_WORDS = stop_words(settings.LANGUAGE_CODE.split('-')[0])
コード例 #2
0
def removeEnglishStopWords():
    """
    deletion of common english words (default)
    """
    englishStopWords = stop_words('en')
    return englishStopWords.rebase(getAllTweets(), '')
コード例 #3
0
ファイル: test_comparison.py プロジェクト: johnfkraus/jproj
 def setUp(self):
     english_stop_words = stop_words('english')
     self.original_stop_words = comparison.STOP_WORDS
     comparison.STOP_WORDS = english_stop_words
     disconnect_entry_signals()
コード例 #4
0
COMMENT_MIN_WORDS = getattr(settings, 'ZINNIA_COMMENT_MIN_WORDS', 4)

COMMENT_FLAG_USER_ID = getattr(settings, 'ZINNIA_COMMENT_FLAG_USER_ID', 1)

UPLOAD_TO = getattr(settings, 'ZINNIA_UPLOAD_TO', 'uploads/zinnia')

PROTOCOL = getattr(settings, 'ZINNIA_PROTOCOL', 'http')

FEEDS_FORMAT = getattr(settings, 'ZINNIA_FEEDS_FORMAT', 'rss')
FEEDS_MAX_ITEMS = getattr(settings, 'ZINNIA_FEEDS_MAX_ITEMS', 15)

PINGBACK_CONTENT_LENGTH = getattr(settings,
                                  'ZINNIA_PINGBACK_CONTENT_LENGTH', 300)

SEARCH_FIELDS = getattr(settings, 'ZINNIA_SEARCH_FIELDS',
                        ['title', 'lead', 'content',
                         'excerpt', 'image_caption', 'tags'])

COMPARISON_FIELDS = getattr(settings, 'ZINNIA_COMPARISON_FIELDS',
                            ['title', 'lead', 'content',
                             'excerpt', 'image_caption', 'tags'])

SPAM_CHECKER_BACKENDS = getattr(settings, 'ZINNIA_SPAM_CHECKER_BACKENDS',
                                [])

URL_SHORTENER_BACKEND = getattr(settings, 'ZINNIA_URL_SHORTENER_BACKEND',
                                'zinnia.url_shortener.backends.default')

STOP_WORDS = stop_words(settings.LANGUAGE_CODE.split('-')[0])
コード例 #5
0
 def setUp(self):
     english_stop_words = stop_words('english')
     self.original_stop_words = comparison.STOP_WORDS
     comparison.STOP_WORDS = english_stop_words
     disconnect_entry_signals()
コード例 #6
0
 def test_stop_words(self):
     self.assertTrue(isinstance(stop_words('french'), StopWord))
     self.assertTrue(isinstance(stop_words('klingon'), StopWord))
     self.assertRaises(StopWordError, stop_words, 'klingon', False)
コード例 #7
0
 def test_stop_words(self):
     self.assertTrue(isinstance(stop_words('french'), StopWord))
     self.assertTrue(isinstance(stop_words('klingon'), StopWord))
     self.assertRaises(StopWordError, stop_words, 'klingon', False)