Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wuenlp-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
kallimachos
wuenlp-tools
Commits
612094e8
Commit
612094e8
authored
3 weeks ago
by
zehe
Browse files
Options
Downloads
Patches
Plain Diff
add openai requirement
parent
7511cfcf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
setup.py
+1
-0
1 addition, 0 deletions
setup.py
visualize/plot.py
+4
-2
4 additions, 2 deletions
visualize/plot.py
with
5 additions
and
2 deletions
setup.py
+
1
−
0
View file @
612094e8
...
@@ -15,6 +15,7 @@ setup(
...
@@ -15,6 +15,7 @@ setup(
install_requires
=
[
# I get to this in a second
install_requires
=
[
# I get to this in a second
"
wuenlp @ git+https://gitlab2.informatik.uni-wuerzburg.de/kallimachos/wuenlp
"
,
"
wuenlp @ git+https://gitlab2.informatik.uni-wuerzburg.de/kallimachos/wuenlp
"
,
"
plotly
"
,
"
plotly
"
,
"
openai
"
,
],
],
classifiers
=
[
classifiers
=
[
'
Development Status :: 3 - Alpha
'
,
'
Development Status :: 3 - Alpha
'
,
...
...
This diff is collapsed.
Click to expand it.
visualize/plot.py
+
4
−
2
View file @
612094e8
...
@@ -9,6 +9,9 @@ from wuenlp.impl.UIMANLPStructs import UIMADocument, UIMAAnnotation, UIMASystemS
...
@@ -9,6 +9,9 @@ from wuenlp.impl.UIMANLPStructs import UIMADocument, UIMAAnnotation, UIMASystemS
# Function to format text with newlines
# Function to format text with newlines
from
utils.summarize
import
summarize_doc
def
format_text
(
text
,
line_length
=
20
,
max_lines
=
75
):
def
format_text
(
text
,
line_length
=
20
,
max_lines
=
75
):
# Split long texts into lines
# Split long texts into lines
split
=
text
.
split
(
"
"
)
split
=
text
.
split
(
"
"
)
...
@@ -32,8 +35,7 @@ def plot_sentiment_interactive(doc: UIMADocument, segment_type: Type[UIMAAnnotat
...
@@ -32,8 +35,7 @@ def plot_sentiment_interactive(doc: UIMADocument, segment_type: Type[UIMAAnnotat
raise
ValueError
(
f
"
No
{
segment_type
.
__name__
}
found in
{
doc
.
path
.
stem
}
"
)
raise
ValueError
(
f
"
No
{
segment_type
.
__name__
}
found in
{
doc
.
path
.
stem
}
"
)
if
call_summarizer_if_necessary
and
not
segments
[
0
].
additional_features
.
get
(
'
llama_summary
'
,
None
):
if
call_summarizer_if_necessary
and
not
segments
[
0
].
additional_features
.
get
(
'
llama_summary
'
,
None
):
raise
NotImplementedError
(
"
Summarizer not implemented
"
)
doc
=
summarize_doc
(
doc
,
segment_type
=
segment_type
)
# doc = summarize_doc(doc, segment_type=segment_type)
# Extracting scenes (assuming 'document' is UIMADocument and has a method to get system scenes)
# Extracting scenes (assuming 'document' is UIMADocument and has a method to get system scenes)
for
segment
in
segments
:
for
segment
in
segments
:
...
...
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