예제 #1
0
    def STOPWORDS(self):
        result = self._stopwords
        if result is None:
            result = loadDataset('stopwords')

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._stopwords = result

        return result
예제 #2
0
    def ABSTRACTS(self):
        result = self._abstracts
        if result is None:
            result = sliceDict(loadDataset('abstracts'), config.SUBSET)

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._abstracts = result

        return result
예제 #3
0
    def KEYWORDS(self):
        result = self._keywords
        if result is None:
            result = sliceDict(loadDataset('keywords'), config.SUBSET)

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._keywords = result

        return result
예제 #4
0
    def CITATIONS(self):
        result = self._citations
        if result is None:
            result = sliceDict(loadDataset('citations'), config.SUBSET)

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._citations = result

        return result
예제 #5
0
    def STOPWORDS(self):
        result = self._stopwords
        if result is None:
            result = loadDataset('stopwords')

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._stopwords = result
            
        return result
예제 #6
0
    def KEYWORDS(self):
        result = self._keywords
        if result is None:
            result = sliceDict(loadDataset('keywords'), config.SUBSET)

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._keywords = result

        return result
예제 #7
0
    def ABSTRACTS(self):
        result = self._abstracts
        if result is None:
            result = sliceDict(loadDataset('abstracts'), config.SUBSET)
        
        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._abstracts = result

        return result
예제 #8
0
    def IDS(self):
        result = self._ids
        if result is None:
            result = [pmid for pmid in loadDataset('ids') if str(pmid).startswith(config.SUBSET)]

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._ids = result
            
        return result
예제 #9
0
    def CITATIONS(self):
        result = self._citations
        if result is None:
            result = sliceDict(loadDataset('citations'), config.SUBSET)
        
        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._citations = result

        return result
예제 #10
0
    def IDS(self):
        result = self._ids
        if result is None:
            result = [
                pmid for pmid in loadDataset('ids')
                if str(pmid).startswith(config.SUBSET)
            ]

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._ids = result

        return result
예제 #11
0
    def SUMMARIES(self):
        result = self._summaries
        if result is None:
            result = sliceDict(loadDataset('summaries'), config.SUBSET)
            paper = namedtuple('paper', ['title', 'authors', 'year', 'doi'])
            for (pmid, paper_info) in result.iteritems():
                result[pmid] = paper(*paper_info)

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._summaries = result

        return result
예제 #12
0
    def SUMMARIES(self):
        result = self._summaries
        if result is None:
            result = sliceDict(loadDataset('summaries'), config.SUBSET)
            paper = namedtuple('paper', ['title', 'authors', 'year', 'doi'])
            for (pmid, paper_info) in result.iteritems():
                result[pmid] = paper( *paper_info )

        if config.CACHEUNPROCESSEDINRAM and config.CACHE:
            self._summaries = result

        return result