Skip to content

Commit d7c69e3

Browse files
author
Evelin Amorim
committed
updating documentation
1 parent 326dbed commit d7c69e3

35 files changed

+3216
-531
lines changed

.readthedocs.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "3.8"
7+
8+
python:
9+
install:
10+
- requirements: requirements.txt
11+
# Install our python package before building the docs
12+
- method: pip
13+
path: .
14+
15+
sphinx:
16+
configuration: docs/source/conf.py

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[tool.poetry]
88
name = "text2story"
9-
version = "1.4.9"
9+
version = "1.5.0"
1010
readme = "README.md"
1111
long_description = "file: README.md"
1212
long_description_content_type = "text/markdown"

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[metadata]
22
description-file = README.md
33
name = text2story
4-
version = 1.4.9
4+
version = 1.5.0
55
long_description = file: README.md
66
long_description_content_type = text/markdown
77
url = https://github.com/LIAAD/Text2StoryPackage

text2story/__init__.py

+26
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
# Version of the text2story package
22
__version__ = "1.0.0"
33

4+
from typing import List
5+
46
from text2story.annotators import load
57
from text2story.annotators import get_available_tools
68
from text2story.annotators import get_participant_tools
79
from text2story.annotators import get_event_tools
810
from text2story.annotators import get_time_tools
911
from text2story.annotators import get_srlink_tools
12+
from text2story.annotators import add_tool, get_tool_list
13+
14+
def get_tools(narrative_component:str):
15+
"""
16+
get the tools for the given narrative component
17+
@param narrative_component:
18+
@return: a dicionary of tools and the languages it process
19+
"""
20+
get_tool_list(narrative_component)
21+
22+
def add_annotator(tool_name:str, lang_lst:List[str], tool_types:List[str]):
23+
"""
24+
It adds a tool to the gallery of annotators.
25+
26+
@param tool: the name of the module where is your annotator
27+
@param lang_lst: a list of languages supported by your custom annotator,
28+
for instance, ['en','fr']
29+
@param tool_types: a list of types that your annotator labels. The
30+
supported types are ['participant','time', 'event','objectal_links',
31+
'semantic_links']
32+
@return: None
33+
"""
34+
35+
add_tool(tool_name,lang_lst,tool_types)
1036

1137
def start(lang):
1238
load(lang)

0 commit comments

Comments
 (0)