Skip to content

gglucass/VisualNarrator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Narrator

Tells Your User Story Graphically

This program reads a text file (.txt, .csv, etc.) containing User Stories and outputs a Manchester Ontology file. As of yet, each line may only contain a single User Story.

Optionally, statistics about the User Story set can be output.

Dependencies

The main dependency for the program is its Natural Language Processor (NLP) spaCy. To run the program, you need:

  • Python >= 3.4
  • spaCy >= 1.1.0 (currently under development using v1.6.0)
  • NumPy >= 1.7
  • Pandas >= 0.17.1
  • Jinja2 >= 2.8

Running the Project

Running the program can only be done from the command line. With the program main directory as current directory, run the program by executing:

python run.py <INPUT FILE> [<arguments>]

Arguments

The most important arguments is INPUT FILE to specify the location of the text input file. The table below provides an overview of the currently implemented arguments.

Positional arguments
Argument Required? Description
INPUT FILE Yes Specify the file name of the User Story input file
Optional arguments
General
Argument Description
-h, --help Show a help message and exit
-n SYSTEM_NAME, --name SYSTEM_NAME Specify a name for your system
-u, --print_us Print additional information per User Story
-o, --print_ont Print the output ontology in the terminal
--prolog Output prolog arguments to a .pl file. Combine with --link to reason about user stories
--version Display the program's version number and exit
Statistics
Argument Description
-s, --statistics Show statistics for the User Story set and output these in .csv files
Ontology generation tuning
Argument Description Type Default
-p, --per_role Create an additional conceptual model per role N/A
-l, --link Link all ontology classes to their respective User Story for usage in the set analysis N/A
-t THRESHOLD Set the threshold for the selected classes FLOAT 1.0
-b BASE_WEIGHT Set the base weight INT 1
-wfr WEIGHT_FUNC_ROLE Weight of functional role FLOAT 1.0
-wmo WEIGHT_MAIN_OBJ Weight of main object FLOAT 1.0
-wffm WEIGHT_FF_MEANS Weight of noun in free form means FLOAT 0.7
-wffe WEIGHT_FF_ENDS Weight of noun in free form ends FLOAT 0.5
-wcompound WEIGHT_COMPOUND Weight of nouns in compound compared to head FLOAT 0.66

Example usage

python run.py example_stories.txt -n "TicketSystem" -u

Conceptual Model

The classes in the program are based on the following conceptual model:

conceptual_model

The Reader starts by reading the input file line by line and generates a list of sentences. These sentences are then enriched using Natural Language Processing, adding Part-of-Speech tags, dependencies, named entity recognition, etc. Subsequently, the StoryMiner uses these enriched sentences to create UserStory objects. The User Story objects contain all the information that could be mined from the sentence. These are then used to attach weight to each term in the User Story, creating Term-by-US Matrix in the Matrix class. The Constructor then constructs patterns out of each user story, using the Term-by-US Matrix to attach a weight to each token. The Constructor forms a model for an ontology, which is then used by the Generator to generate a Manchester Ontology file (.omn) and optionally a Prolog file (.pl). Finally, these files are printed to an actual file by the Writer in the '/ontologies' and '/prolog' folders respectively.

About

Developed at Utrecht University

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.3%
  • HTML 13.7%