Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
obc2kg
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
Container Registry
Model registry
Operate
Environments
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
born
obc2kg
Commits
74eb760e
Commit
74eb760e
authored
5 years ago
by
born
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
144b92e4
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
README.md
+36
-2
36 additions, 2 deletions
README.md
with
36 additions
and
2 deletions
README.md
+
36
−
2
View file @
74eb760e
...
...
@@ -4,7 +4,7 @@ This repo contains the resources (data and scripts) for the workshop entitled "P
## Repo structure
*
_data/_ contains the untagged -- but annotated -- files of the
[
Old Bailey Corpus
](
http://fedora.clarin-d.uni-saarland.de/oldbailey/index.html
)
*
_data/_ contains the untagged -- but annotated -- files of the
[
Old Bailey Corpus
](
http://fedora.clarin-d.uni-saarland.de/oldbailey/index.html
)
(
OBC
)
*
_output/_ is used as the default output directory for created knowledge graphs
*
_output/gold/_ contains some sample knowledge graphs for the years 1720, 1820, and 1913
*
_src/_ contains all scripts
...
...
@@ -58,4 +58,38 @@ Install with pip:
**NOTE**
: _spacy_ must not be version 2.1.5!
##
\ No newline at end of file
## How to create knowledge graphs
The file to interact with to generate knowledge graphs from the OBC is _main.py_.
To re-create the sample knowledge graph for the year 1913, simply type:
python main.py -year 1913 -output_path "../output/example_graph_1913.json"
To display all available options, type:
python main.py -h
This gives you:
usage: main.py [-h] [-year YEAR [YEAR ...]] [-output_path OUTPUT_PATH]
[-text_node_simplification_mode {None,classifier,spacy_direct_object}]
[-verbose {0,1,2}]
[-prune_text_nodes_min_freq PRUNE_TEXT_NODES_MIN_FREQ]
Building a graph from old bailey corpus.
optional arguments:
-h, --help show this help message and exit
-year YEAR [YEAR ...]
what year(s) the graph should cover, leave empty to
cover all available years
-output_path OUTPUT_PATH
where to save output graph
-text_node_simplification_mode {None,classifier,spacy_direct_object}
simplify text nodes, e.g.: "murder of x , on the
Monday of(...)" --> "murder"
-verbose {0,1,2} logging level
-prune_text_nodes_min_freq PRUNE_TEXT_NODES_MIN_FREQ
how often a text description node has to occur to be
included in the graph
\ No newline at end of file
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