Skip to content

Commit

Permalink
minor fixes in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
anne17 committed Jun 30, 2022
1 parent b26e8e8 commit fff9c45
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions docs/developers-guide/config-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions docs/md2pdf/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions docs/md2pdf/make_pdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion docs/md2pdf/settings_template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/user-manual/corpus-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -196,7 +196,7 @@ instead of the more compact:
<token pos="IN" baseform="|hej|">Hej</token>
```

`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: <sentence>` or `export.scramble_on:
<paragraph>`. For example, setting this to `<paragraph>` would lead to all paragraphs being randomly shuffled in the
export, while the sentences and tokens within the paragraphs keep their original order.
Expand Down
14 changes: 7 additions & 7 deletions docs/user-manual/installation-and-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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.
Expand Down Expand Up @@ -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:
```
Expand Down

0 comments on commit fff9c45

Please sign in to comment.