Exemple #1
0
 def get_info(self, corpus_id: str) -> DefaultManateeCorpusInfo:
     try:
         if corpus_id not in self._cache:
             self._cache[corpus_id] = DefaultManateeCorpusInfo(manatee.Corpus(corpus_id), corpus_id)
         return self._cache[corpus_id]
     except:
         # probably a misconfigured/missing corpus
         return DefaultManateeCorpusInfo(EmptyCorpus(corpname=corpus_id), corpus_id)
Exemple #2
0
 def get_info(self, corpus_id):
     try:
         if corpus_id not in self._cache:
             self._cache[corpus_id] = DefaultManateeCorpusInfo(
                 manatee.Corpus(corpus_id), corpus_id)
         return self._cache[corpus_id]
     except Exception as ex:
         logging.getLogger(__name__).warning(ex)
         # probably a misconfigured/missing corpus
         return DefaultManateeCorpusInfo(EmptyCorpus(corpname=corpus_id),
                                         corpus_id)