コード例 #1
0
    def createAnnotation(self, domain, document, html, mentions):
        annotation = Annotation()
        annotation['concept'] = 'Bio3DMInformation'
        annotation['property:name'] = '%s: "%s"' % (
            mentions[0]['mentionType'].title(),
            mentions[0]['formalRepresentation'])
        annotation['property:description'] = '3DM %s record' % mentions[0][
            'mentionType'].title()
        annotation['property:sourceDatabase'] = domain
        annotation['property:html'] = mentions[0]['html']
        annotation['property:css'] = mentions[0]['css']
        annotation['property:js'] = mentions[0]['js']
        annotation['property:sourceDatabase'] = 'bioprodict'
        annotation[
            'property:sourceDescription'] = '<p><a href="http://www.bio-prodict.nl">Bio-Prodict\'s</a> 3DM information systems provide protein family-specific annotations for this article</p>'
        annotation['session:overlay'] = 'hyperlink'
        annotation['session:color'] = '#336611'

        for mention in mentions:
            for textRange in mention['textRangeList']:
                start = int(textRange['start'])
                end = int(textRange['end'])
                match = document.substr(start, end - start)
                annotation.addExtent(match)

        return annotation
コード例 #2
0
    def createAnnotation(self, document, html, mentions):
        annotation = spineapi.Annotation()
        annotation['concept'] = 'NucleaRDBInformation'
        annotation['property:name'] = '%s: "%s"' % (mentions[0].mentionType.title(), mentions[0].formalRepresentation)
        annotation['property:description'] = 'NucleaRDB %s record' % mentions[0].mentionType.title()
        annotation['property:sourceDatabase'] = 'nucleardb'
        annotation['property:sourceDescription'] = '<p>The <a href="http://www.receptors.org/nucleardb/">NucleaRDB</a> is a molecular-class information system that collects, combines, validates and stores large amounts of heterogenous data on nuclear hormone receptors.</p>'
        annotation['property:html'] = html

        for mention in mentions:
            #print mention
            start = int(mention.textStart)
            end = int(mention.textEnd)
            match = document.substr(start, end-start)
            annotation.addExtent(match)

        return annotation
コード例 #3
0
    def createAnnotation(self, document, html, mentions):
        annotation = spineapi.Annotation()
        annotation['concept'] = 'NucleaRDBInformation'
        annotation['property:name'] = '%s: "%s"' % (mentions[0].mentionType.title(), mentions[0].formalRepresentation)
        annotation['property:description'] = 'NucleaRDB %s record' % mentions[0].mentionType.title()
        annotation['property:sourceDatabase'] = 'nucleardb'
        annotation['property:sourceDescription'] = '<p>The <a href="http://www.receptors.org/nucleardb/">NucleaRDB</a> is a molecular-class information system that collects, combines, validates and stores large amounts of heterogenous data on nuclear hormone receptors.</p>'
        annotation['property:html'] = html

        for mention in mentions:
            #print mention
            start = int(mention.textStart)
            end = int(mention.textEnd)
            match = document.substr(start, end-start)
            annotation.addExtent(match)

        return annotation
コード例 #4
0
    def createAnnotation(self, domain, document, html, mentions):
        annotation = Annotation()
        annotation["concept"] = "Bio3DMInformation"
        annotation["property:name"] = '%s: "%s"' % (mentions[0].mentionType.title(), mentions[0].formalRepresentation)
        annotation["property:description"] = "3DM %s record" % mentions[0].mentionType.title()
        annotation["property:sourceDatabase"] = domain
        annotation["property:html"] = mentions[0].html
        annotation["property:css"] = mentions[0].css
        annotation["property:js"] = mentions[0].js
        annotation["property:sourceDatabase"] = "bioprodict"
        annotation[
            "property:sourceDescription"
        ] = '<p><a href="http://www.bio-prodict.nl">Bio-Prodict\'s</a> 3DM information systems provide protein family-specific annotations for this article</p>'

        for mention in mentions:
            for textRange in mention.textRangeList:
                start = int(textRange.start)
                end = int(textRange.end)
                match = document.substr(start, end - start)
                annotation.addExtent(match)

        return annotation