core.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:QuitStore 作者: AKSW 项目源码 文件源码
def getgraphfromfile(self):
        """Return a Conjunctive Graph generated from the referenced file.

        Returns:
            A ConjunctiveGraph
        """
        graph = ConjunctiveGraph()

        try:
            graph.parse(self.path, format='nquads', publicID='http://localhost:5000/')
            logger.debug('Success: File', self.path, 'parsed')
        except KeyError as e:
            # Given file contains non valid rdf data
            # logger.debug('Error: File', self.path, 'not parsed')
            # self.__setcontent([[None][None][None][None]])
            pass

        return graph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号