From fff9c45ac8e85d7af60725e0e2139e2dccdda97a Mon Sep 17 00:00:00 2001 From: Anne Schumacher Date: Wed, 29 Jun 2022 14:42:09 +0200 Subject: [PATCH] minor fixes in documentation --- docs/README.md | 2 +- docs/developers-guide/config-parameters.md | 18 +++++++++--------- docs/md2pdf/filter.py | 3 +++ docs/md2pdf/make_pdf.sh | 1 + docs/md2pdf/settings_template.tex | 5 ++++- docs/user-manual/corpus-configuration.md | 4 ++-- docs/user-manual/installation-and-setup.md | 14 +++++++------- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/docs/README.md b/docs/README.md index a32579fd..b88cb291 100644 --- a/docs/README.md +++ b/docs/README.md @@ -44,7 +44,7 @@ Sync HTML documentation to server: Install requirements (markdown and latex): ``` -sudo apt-get install markdown texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra +sudo apt-get install markdown pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra ``` Convert User Manual and Developer's Guide from markdown to PDF: diff --git a/docs/developers-guide/config-parameters.md b/docs/developers-guide/config-parameters.md index 230e1bb2..5045bf55 100644 --- a/docs/developers-guide/config-parameters.md +++ b/docs/developers-guide/config-parameters.md @@ -79,18 +79,18 @@ for the `import` and the `export` categories that are inherited by importers and Inheritable configuration keys for `import`: -| config key | description | -|:---------------------|:------------| -| `text_annotation` | The annotation representing one text. Any text-level annotations will be attached to this annotation. -| `encoding` | Encoding of source file. Defaults to UTF-8. -| `keep_control_chars` | Set to True if control characters should not be removed from the text. -| `normalize` | Normalize input using any of the following forms: 'NFC', 'NFKC', 'NFD', and 'NFKD'. -| `source_dir` | The path to the directory containing the source files relative to the corpus directory. +| config key | description | +|:---------------|:-----------------------------------------------| +|`text_annotation` | The annotation representing one text. Any text-level annotations will be attached to this annotation. +|`encoding` | Encoding of source file. Defaults to UTF-8. +|`keep_control_chars` | Set to True if control characters should not be removed from the text. +|`normalize` | Normalize input using any of the following forms: 'NFC', 'NFKC', 'NFD', and 'NFKD'. +|`source_dir` | The path to the directory containing the source files relative to the corpus directory. Inheritable configuration keys for `export`: -| config key | description | -|:-----------|:-------------| +| config key | description | +|:-----------|:-----------------------| |`default` | Exports to create by default when running 'sparv run'. |`source_annotations` | List of annotations from the source file to be kept. |`annotations` | List of automatic annotations to include. diff --git a/docs/md2pdf/filter.py b/docs/md2pdf/filter.py index e7d437e6..c9fa21bd 100644 --- a/docs/md2pdf/filter.py +++ b/docs/md2pdf/filter.py @@ -21,6 +21,9 @@ def fix_document(key, value, _format, _meta): if first_string == "[!NOTE]": value[0]["c"][0] = Strong([Str("Note:")]) return BlockQuote(value) + elif first_string == "[!INFO]": + value[0]["c"][0] = Strong([Str("Info:")]) + return BlockQuote(value) elif first_string == "[!TIP]": value[0]["c"][0] = Strong([Str("Tip:")]) return BlockQuote(value) diff --git a/docs/md2pdf/make_pdf.sh b/docs/md2pdf/make_pdf.sh index 753b76b2..2b3f6053 100755 --- a/docs/md2pdf/make_pdf.sh +++ b/docs/md2pdf/make_pdf.sh @@ -5,6 +5,7 @@ # Requires markdown and latex USER_MANUAL_FILES=" +../user-manual/quick-start.md ../user-manual/installation-and-setup.md ../user-manual/running-sparv.md ../user-manual/requirements-for-source-files.md diff --git a/docs/md2pdf/settings_template.tex b/docs/md2pdf/settings_template.tex index 51736fb0..a3430f0f 100644 --- a/docs/md2pdf/settings_template.tex +++ b/docs/md2pdf/settings_template.tex @@ -5,12 +5,15 @@ \usepackage{fourier} % Use the Adobe Utopia font for the document \usepackage[english]{babel} % English language/hyphenation +\usepackage[scaled]{helvet} % Use Helvetica font +\renewcommand\familydefault{\sfdefault} + \usepackage{graphicx} % For including graphics \usepackage[dvipsnames]{xcolor} % Display colors \usepackage{pmboxdraw} % Display funny tree structure chars \usepackage{sectsty} % Allows customizing section commands -\allsectionsfont{\normalfont\scshape} % Make all sections centered, the default font and small caps +\allsectionsfont{\normalfont\bf} % Make all sections centered, the default font and bold \usepackage[a4paper, margin=3cm]{geometry} % Smaller margins % \linespread{1.1} % Line spacing diff --git a/docs/user-manual/corpus-configuration.md b/docs/user-manual/corpus-configuration.md index a49df147..65e912da 100644 --- a/docs/user-manual/corpus-configuration.md +++ b/docs/user-manual/corpus-configuration.md @@ -76,7 +76,7 @@ The `metadata` section of your corpus config contains metadata about your corpus - `metadata.language` defines the language of the source files in the corpus. This should be an ISO 639-3 code. If not specified it defaults to `swe`. Run `sparv languages` to list the supported languages along with their language codes. -- `metadata.variety` is an optional field containing the language variety of source files (if applicable). Run +- `metadata.variety` is an optional field containing the language variety of the source files (if applicable). Run `sparv languages` to list the supported varieties for each language. - `metadata.description` is an optional description for the corpus. It may consist of multiple lines. This option is @@ -196,7 +196,7 @@ instead of the more compact: Hej ``` -`export.scramble_on` is a setting used by all the export formats that support scrambling. It controls what annotation +`export.scramble_on` is a setting used by all the export formats that support scrambling. It controls which annotation your corpus will be scrambled on. Typical settings are `export.scramble_on: ` or `export.scramble_on: `. For example, setting this to `` would lead to all paragraphs being randomly shuffled in the export, while the sentences and tokens within the paragraphs keep their original order. diff --git a/docs/user-manual/installation-and-setup.md b/docs/user-manual/installation-and-setup.md index 82fb022c..0770210b 100644 --- a/docs/user-manual/installation-and-setup.md +++ b/docs/user-manual/installation-and-setup.md @@ -204,9 +204,9 @@ After downloading the software you need to have the `tree-tagger` binary in your |:---|:----------| |**Purpose** |Various analyses for English |**Download** |[Stanford CoreNLP webpage](https://stanfordnlp.github.io/CoreNLP/history.html) -|**Version compatible with Sparv** |4.0.0 (may work with newer versions) |**License** |[GPL-2.0](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) -|**Dependencies** |[Java](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) +|**Version compatible with Sparv** |4.0.0 (may work with newer versions) +|**Dependencies** |[Java](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) Please download, unzip and place contents inside the [Sparv data directory](#setting-up-sparv) under `bin/stanford_parser`. @@ -215,8 +215,8 @@ Please download, unzip and place contents inside the [Sparv data directory](#set |:---|:----------| |**Purpose** |Tokenisation, POS-tagging, lemmatisation and named entity recognition for [some languages](#software-for-analysing-other-languages-than-swedish) |**Download** |[FreeLing on GitHub](https://github.com/TALP-UPC/FreeLing/releases/tag/4.2) -|**Version compatible with Sparv** |4.2 |**License** |[AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.en.html) +|**Version compatible with Sparv** |4.2 Please install the software (including the additional language data) according to the instructions provided by FreeLing. Note that you will need to uncompress the source and language files in the same folder before compiling. @@ -246,10 +246,10 @@ pipx inject sparv-pipeline [pointer-to-sparv-plugin] The `pointer-to-sparv-plugin` can be a package available on the [Python Package Index (PyPI)](https://pypi.org/), a remote public repository, or a local directory on your machine. -For now there are two plugins available for Sparv: [sparv-sbx-freeling](https://github.com/spraakbanken/sparv-sbx-freeling) and -[sparv-sbx-metadata](https://github.com/spraakbanken/sparv-sbx-metadata) The only available plugin for Sparv available -so far is [the sparv-sbx-freeling plugin](https://github.com/spraakbanken/sparv-sbx-freeling). Please refer to their GitHub page -for more information. +For now there are two plugins available for Sparv: +[sparv-sbx-freeling](https://github.com/spraakbanken/sparv-sbx-freeling) and +[sparv-sbx-metadata](https://github.com/spraakbanken/sparv-sbx-metadata). Please refer to their GitHub page for more +information. Plugins can be uninstalled by running: ```