Skip to content

Commit

Permalink
Merge pull request #1 from navigating-stories/nlptagger
Browse files Browse the repository at this point in the history
Nlptagger
  • Loading branch information
kodymoodley authored May 12, 2023
2 parents beb4087 + d7e9046 commit 2209224
Show file tree
Hide file tree
Showing 16 changed files with 2,065 additions and 39 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
build
dist
Orange3_Network.egg-info
Orange_Story_Navigator.egg-info
doc/_build
*.so
*.pyd
Expand All @@ -10,6 +11,7 @@ MANIFEST

# virtual environment
nv
venv

# Cython generated files
__pycache__
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Orange3 Story Navigator
=======================

Orange3-Story-Navigator is an add-on for the Orange data mining software package. It
provides story textual analysis features based on principles in [narrative psychology](https://web.lemoyne.edu/~hevern/narpsych/nr-basic.html). The aim of the widgets in the Story Navigator Orange module are to support human analysis of stories represented in digital texts with a main focus on identifying and describing the following components of the narrative (see [[1]](http://www.communicationcache.com/uploads/1/0/8/8/10887248/kenneth_burke_-_a_grammar_of_motives_1945.pdf) and [[2]](https://www.semanticscholar.org/paper/Qualitative-Research-in-Clinical-and-Health-Murray-Sools/8db3916fcd1593086f0a62d78d15eacc2d3236e6) for definitions):
provides story textual analysis features based on principles in [narrative psychology](https://web.lemoyne.edu/~hevern/narpsych/nr-basic.html). The aim of the widgets in the Story Navigator Orange module are to support human analysis of stories represented in digital texts with a main focus on identifying and describing the following components of the narrative (see [[1]](http://www.communicationcache.com/uploads/1/0/8/8/10887248/kenneth_burke_-_a_grammar_of_motives_1945.pdf), [[2]](https://www.semanticscholar.org/paper/Qualitative-Research-in-Clinical-and-Health-Murray-Sools/8db3916fcd1593086f0a62d78d15eacc2d3236e6) and [[3]](https://www.tandfonline.com/doi/abs/10.1080/13645579.2020.1723205?journalCode=tsrm20) for definitions and theory):

1. Setting
2. Main agent
Expand All @@ -13,30 +13,37 @@ provides story textual analysis features based on principles in [narrative psych

[1] Burke, K. (1969). The grammar of motives. Prentice Hall, New York. Originally published in 1945.
[2] M. Murray and A. Sools, P. Rohleder, A.C. Lyons (Eds.), Qualitative research in clinical and health psychology, Palgrave MacMillan, Houndmills Basingstoke (2015), pp. 133-154
[3] Andrade, S. B., & Andersen, D. (2020). Digital story grammar: a quantitative methodology for narrative analysis. International Journal of Social Research Methodology, 23(4), 405-421.

[Story Navigator documentation]().
[Story Navigator documentation](http://orange-story-navigator.readthedocs.org/).

Documentation is found at: http://orange3-storynavigator.readthedocs.org/
Documentation is found at: http://orange-story-navigator.readthedocs.org/

Installation:
-------------

Requirements:

1. Orange3 v3.34+
2. Orange3-text v1.12+

This section is for those who just want to install and use the add-on in Orange3.

Install from Orange add-on installer through Options - Add-ons.
Install from Orange add-on installer through Options - Add-ons. **Note:** the add-on requires [Orange3-text](https://github.com/biolab/orange3-text), so first install this library before installing orange-story-navigator.

To install the add-on with [pip](https://pypi.org/project/pip/) use

pip install Orange-Story-Navigator
pip install orange-story-navigator

Development:
------------

This section is for those who want to build the add-on from source and extend, customise, or fix bugs in it.
**Note:** Mac M1 (Apple silicon) users may encounter problems with building ``orange-story-navigator`` using certain Python 3.8.x or 3.9.x versions and / or actually building or running these specific Python versions at all on your Mac. If you encounter such issues, it is recommended to install [Rosetta 2](https://osxdaily.com/2020/12/04/how-install-rosetta-2-apple-silicon-mac/) and always run the terminal using Rosetta 2 (see how to do the latter [here](https://www.courier.com/blog/tips-and-tricks-to-setup-your-apple-m1-for-development/)) for development tasks.

Requirements:

1. A tool for checking out a [Git]() repository
1. A tool for checking out a [Git](https://git-scm.com/) repository
2. Python 3.9.16+

Steps to build and test from source:
Expand Down Expand Up @@ -69,4 +76,4 @@ or

```python -m Orange.canvas```

The Orange3 application should start up after a few seconds and you can test the ```story-navigator``` widget.
The Orange3 application should start up after a few seconds and you can test the ```orange-story-navigator``` widgets.
22 changes: 11 additions & 11 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Orange3-Network documentation build configuration file, created by
# orange-story-navigator documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 28 14:12:24 2016.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -57,9 +57,9 @@
master_doc = 'index'

# General information about the project.
project = 'Orange3-Network'
copyright = '2016, Biolab'
author = 'Biolab'
project = 'orange-story-navigator'
copyright = '2023, The Netherlands eScience Center'
author = 'Kody Moodley'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -75,7 +75,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -213,7 +213,7 @@
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'Orange3-Networkdoc'
htmlhelp_basename = 'Orange-Story-Navigator-doc'

# -- Options for LaTeX output ---------------------------------------------

Expand All @@ -235,8 +235,8 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Orange3-Network.tex', 'Orange3-Network Documentation',
'Biolab', 'manual'),
(master_doc, 'orange-story-navigator.tex', 'Orange-Story-Navigator Documentation',
'The Netherlands eScience Center', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -265,7 +265,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'orange3-network', 'Orange3-Network Documentation',
(master_doc, 'orange-story-navigator', 'Orange-Story-Navigator Documentation',
[author], 1)
]

Expand All @@ -279,8 +279,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Orange3-Network', 'Orange3-Network Documentation',
author, 'Orange3-Network', 'One line description of project.',
(master_doc, 'orange-story-navigator', 'Orange-Story-Navigator Documentation',
author, 'Orange-Story-Navigator', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
18 changes: 7 additions & 11 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
Orange3 Networks Add-on
=======================
Orange3 Story Navigator Add-on
==============================

Widgets
-------

.. toctree::
:maxdepth: 1

widgets/networkfile
widgets/networkexplorer
widgets/networkgenerator
widgets/networkanalysis
widgets/networkclustering
widgets/networkofgroups
widgets/networkfromdistances
widgets/singlemode

widgets/dsgdepparser
widgets/dsgruleset
widgets/dsgsrl
widgets/dsgtagger

Indices and tables
==================

Expand Down
7 changes: 7 additions & 0 deletions doc/widgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
"icon": "../orangecontrib/storynavigation/widgets/icons/dsg_ruleset_icon.png",
"background": "#C0FF97",
"keywords": []
},
{
"text": "Digital Story Grammar Word Highlighter",
"doc": "widgets/dsgtagger.md",
"icon": "../orangecontrib/storynavigation/widgets/icons/dsgtagger.svg",
"background": "#C0FF97",
"keywords": []
}
]
]
Expand Down
4 changes: 2 additions & 2 deletions doc/widgets/dsgdepparser.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Story Navigator
===============
Dependency Parser
=================

NLP Dependency Parsing for Dutch and English.

Expand Down
4 changes: 2 additions & 2 deletions doc/widgets/dsgruleset.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Story Navigator
===============
Ruleset Parser
==============

Calculation of subject, verb, object tuples in sentences using predefined NLP rules.

Expand Down
4 changes: 2 additions & 2 deletions doc/widgets/dsgsrl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Story Navigator
===============
Semantic Role Labeller
======================

Semantic Role Labelling (SRL) for Dutch and English documents.

Expand Down
21 changes: 21 additions & 0 deletions doc/widgets/dsgtagger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Word Highlighter
================

Word highlighter supporting Named Entity Recognition and Part of Speech tagging for Dutch and English documents.

**Inputs**

- Corpus: A dataset of one or more textual documents in Dutch or English.

**Outputs**

- Table: A data table providing all identified entities in each sentence of the input text documents.

**Word Highlighter** widget applies NER and POS-tagging to sentences. It highlights the identified entities inline in the input text documents.

![](images/dsgtagger-example2.png)

Example
-------

This simple example shows how **Word Highlighter** can enrich the workflow. We have used a dataset of Dutch narrative stories about the corona pandemic.
Binary file added doc/widgets/images/dsgtagger-example2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2209224

Please sign in to comment.