Skip to content

Commit b5e184c

Browse files
maxaraiapmoore1
andauthored
Update installation.md (#58)
* Update installation.md Some shells (like zsh) require quotes to avoid attempting to interpret the square braces. * Added a tab to switch between bash and zsh shell instructions --------- Co-authored-by: Andrew Moore <andrew.p.moore94@gmail.com>
1 parent 53121ff commit b5e184c

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

docs/docs/usage/getting_started/installation.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ title: Installation
44
sidebar_position: 2
55
---
66

7+
import Tabs from '@theme/Tabs';
8+
import TabItem from '@theme/TabItem';
9+
710
# Install PyMUSAS
811

912
Can be installed on all operating systems and supports Python version >= `3.10` and < `3.14`, to install run:
@@ -26,6 +29,19 @@ this will install the default version of [PyTorch](https://pytorch.org/) for you
2629

2730
:::
2831

32+
<Tabs groupId="shell-choice">
33+
<TabItem value="bash" label="bash">
34+
2935
``` bash
3036
pip install pymusas[neural]
31-
```
37+
```
38+
39+
</TabItem>
40+
<TabItem value="zsh" label="zsh">
41+
42+
``` bash
43+
pip install 'pymusas[neural]'
44+
```
45+
46+
</TabItem>
47+
</Tabs>

docs/docs/usage/how_to/tag_text_with/neural_tagger.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Neural Tagger
33
sidebar_position: 2
44
---
55

6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
69
In this guide we are going to show you how to tag text with the PyMUSAS [NeuralTagger](/api/spacy_api/taggers/neural.md#neuraltagger) so that you can extract token level [USAS semantic tags](https://ucrel.lancs.ac.uk/usas/) from the tagged text. The guide will;
710

811
* State the available neural taggers that can be used.
@@ -286,6 +289,11 @@ We need:
286289
* `en_none_none_none_englishbasebem` the [larger 68 million parameter English Neural Tagger model.](https://github.com/UCREL/pymusas-models/releases/tag/en_none_none_none_englishbasebem-0.4.0)
287290

288291
To download these run the following:
292+
293+
294+
<Tabs groupId="shell-choice">
295+
<TabItem value="bash" label="bash">
296+
289297
``` bash
290298
pip install pymusas[neural] datasets
291299
# small spaCy English pipeline
@@ -294,6 +302,20 @@ pip install https://github.com/explosion/spacy-models/releases/download/en_core_
294302
pip install https://github.com/UCREL/pymusas-models/releases/download/en_none_none_none_englishbasebem-0.4.0/en_none_none_none_englishbasebem-0.4.0-py3-none-any.whl
295303
```
296304

305+
</TabItem>
306+
<TabItem value="zsh" label="zsh">
307+
308+
``` bash
309+
pip install 'pymusas[neural]' datasets
310+
# small spaCy English pipeline
311+
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl
312+
# PyMUSAS neural tagger
313+
pip install https://github.com/UCREL/pymusas-models/releases/download/en_none_none_none_englishbasebem-0.4.0/en_none_none_none_englishbasebem-0.4.0-py3-none-any.whl
314+
```
315+
316+
</TabItem>
317+
</Tabs>
318+
297319
### Tagging long or large texts
298320

299321
First we import the relevant libraries, create a few helper functions that will download and process the Wikipedia articles, and then use these functions to download *N* English Wikipedia articles to a temporary directory (so that after the script has ran they will be deleted to save disk space), whereby the number of articles we download will contain at least 10,000 tokens/words after we have got to this token limit we will not download anymore Wikipedia articles;

0 commit comments

Comments
 (0)