コード例 #1
0
ファイル: text.py プロジェクト: zerodb/zerodbext.catalog
 def __init__(self, discriminator, lexicon=None, index=None):
     if not callable(discriminator):
         if not isinstance(discriminator, six.string_types):
             raise ValueError('discriminator value must be callable or a '
                              'string')
     self.discriminator = discriminator
     self._not_indexed = self.family.IF.Set()
     TextIndex.__init__(self, lexicon, index)
     self.clear()
コード例 #2
0
 def __init__(self, discriminator, lexicon=None, index=None):
     if not callable(discriminator):
         if not isinstance(discriminator, six.string_types):
             raise ValueError('discriminator value must be callable or a '
                              'string')
     self.discriminator = discriminator
     self._not_indexed = self.family.IF.Set()
     TextIndex.__init__(self, lexicon, index)
     self.clear()
コード例 #3
0
ファイル: text.py プロジェクト: barkinet/zerodb
    def __init__(self, discriminator, lexicon=None, index=None):
        self._init_discriminator(discriminator)

        self._not_indexed = self.family.IF.Set()

        lexicon = lexicon or Lexicon(Splitter(), CaseNormalizer(), StopWordRemover())
        index = index or OkapiIndex(lexicon, family=self.family)

        ZopeTextIndex.__init__(self, lexicon, index)
        self.clear()
コード例 #4
0
ファイル: text.py プロジェクト: yonglehou/zerodb
    def __init__(self, discriminator, lexicon=None, index=None):
        self._init_discriminator(discriminator)

        self._not_indexed = self.family.IF.Set()

        lexicon = lexicon or Lexicon(Splitter(), CaseNormalizer(),
                                     StopWordRemover())
        index = index or OkapiIndex(lexicon, family=self.family)

        ZopeTextIndex.__init__(self, lexicon, index)
        self.clear()