Skip to content

Commit f115931

Browse files
authored
Merge pull request #3587 from flairNLP/release-15-documentation
Documentation for 0.15. release
2 parents 0becfed + 8a829fb commit f115931

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

docs/tutorial/intro.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,8 @@ The output shows that the sentence "_I love Berlin and New York._" was tagged as
8989

9090
## Summary
9191

92-
Congrats, you now know how to use Flair to find entities and detect sentiment!
92+
Congrats, you now know how to use Flair to find entities and detect sentiment!
93+
94+
## Next steps
95+
96+
If you want to know more about Flair, next check out [Tutorial 1](tutorial-basics/) that gives an intro into the basics of Flair!

docs/tutorial/tutorial-basics/basic-types.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ This print-out includes the token index (3) and the lexical value of the token (
8787
When you create a [`Sentence`](#flair.data.Sentence) as above, the text is automatically tokenized (segmented into words) using the [segtok](https://pypi.org/project/segtok/) library.
8888

8989
```{note}
90-
You can also use a different tokenizer if you like. To learn more about this, check out our tokenization tutorial.
90+
You can also use a different tokenizer by passing a different [`Tokenizer`](#flair.tokenization.Tokenizer ) to the Sentence
91+
when you initialize it.
9192
```
9293

9394

docs/tutorial/tutorial-training/how-to-load-prepared-dataset.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ This will print out the created dictionary:
115115
Dictionary with 17 tags: PROPN, PUNCT, ADJ, NOUN, VERB, DET, ADP, AUX, PRON, PART, SCONJ, NUM, ADV, CCONJ, X, INTJ, SYM
116116
```
117117

118-
#### Dictionaries for other label types
118+
119+
### Printing label statistics
119120

120121
If you don't know the label types in a corpus, just call [`Corpus.make_label_dictionary`](#flair.data.Corpus.make_label_dictionary) with
121122
any random label name (e.g. `corpus.make_label_dictionary(label_type='abcd')`). This will print
@@ -139,17 +140,6 @@ tense_dictionary = corpus.make_label_dictionary(label_type='number')
139140
If you print these dictionaries, you will find that the POS dictionary contains 50 tags and the number dictionary only 2 for this corpus (singular and plural).
140141

141142

142-
#### Dictionaries for other corpora types
143-
144-
The method [`Corpus.make_label_dictionary`](#flair.data.Corpus.make_label_dictionary) can be used for any corpus, including text classification corpora:
145-
146-
```python
147-
# create label dictionary for a text classification task
148-
from flair.datasets import TREC_6
149-
corpus = TREC_6()
150-
corpus.make_label_dictionary('question_class')
151-
```
152-
153143
### The MultiCorpus Object
154144

155145
If you want to train multiple tasks at once, you can use the [`MultiCorpus`](#flair.data.MultiCorpus) object.
@@ -175,6 +165,7 @@ The [`MultiCorpus`](#flair.data.MultiCorpus) inherits from [`Corpus`](#flair.dat
175165
Flair supports many datasets out of the box. It usually automatically downloads and sets up the data the first time you
176166
call the corresponding constructor ID.
177167
The datasets are split into multiple modules, however they all can be imported from `flair.datasets` too.
168+
178169
You can look up the respective modules to find the possible datasets.
179170

180171
The following datasets are supported:

0 commit comments

Comments
 (0)