Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Text Mining Resources Hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carlos Vega
Text Mining Resources Hub
Commits
de9d5206
Commit
de9d5206
authored
5 years ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
improved method description docstring
parent
ee5e041c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interface/TextMiningService.py
+14
-6
14 additions, 6 deletions
interface/TextMiningService.py
with
14 additions
and
6 deletions
interface/TextMiningService.py
+
14
−
6
View file @
de9d5206
from
abc
import
ABCMeta
,
abstractmethod
from
typing
import
List
class
Publication
():
def
__init__
(
self
,
pmc_id
,
pm_id
,
doi
,
preprint_id
,
other_id
):
self
.
pmc_id
=
pmc_id
...
...
@@ -11,15 +12,23 @@ class Publication():
class
TextMiningService
(
metaclass
=
ABCMeta
):
def
__init__
(
self
,
name
:
str
,
description
:
str
):
self
.
name
=
name
self
.
description
=
description
@abstractmethod
def
getMentions
(
self
,
entities
:
List
)
->
List
[
Publication
]:
"""
Mentions at publication level
def
getMentions
(
self
,
entities
:
List
[
str
],
limit
:
int
=
20
)
->
List
[
Publication
]:
"""
Returs a list of publications for a given list of entity IDs in which the entities appear.
Arguments:
entities {List[str]} -- [description]
Keyword Arguments:
limit {int} -- [description] (default: {20})
Returns:
List[Publication] -- [description]
"""
pass
...
...
@@ -31,4 +40,3 @@ class TextMiningService(metaclass=ABCMeta):
To-do: decide how to handle resources that can provide co-occurrences at sentence level
"""
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment