Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix minor text errors in notebook docs #1600

Merged
merged 14 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions docs/features/models/NER.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"source": [
"First make sure you have the DeepPavlov Library installed.\n",
"[More info about the first installation](http://docs.deeppavlov.ai/en/master/intro/installation.html)"
"[More info about the first installation.](http://docs.deeppavlov.ai/en/master/intro/installation.html)"
]
},
{
Expand Down Expand Up @@ -140,7 +140,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`ner_ontonotes_bert_torch` here is the name of the model's *config_file*. [What is a Config File?](http://docs.deeppavlov.ai/en/master/intro/configuration.html) \n",
"`ner_ontonotes_bert_torch` is the name of the model's *config_file*. [What is a Config File?](http://docs.deeppavlov.ai/en/master/intro/configuration.html) \n",
"\n",
"Configuration file defines the model and describes its hyperparameters. To use another model, change the name of the *config_file* here and further.\n",
"The full list of NER models with their config names can be found in the [table](#6.-Models-list)."
Expand Down Expand Up @@ -238,7 +238,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also get predictions in an interactive mode through CLI."
"You can also get predictions in an interactive mode through CLI (Сommand Line Interface)."
]
},
{
Expand Down Expand Up @@ -288,7 +288,7 @@
"\n",
"`ner_f1` is measured on the entity-level (actual text spans should match exactly)\n",
"\n",
"`ner_token_f1` is measured on a token level (correct tokens from not fully extracted entities will still be counted as TPs)"
"`ner_token_f1` is measured on a token level (correct tokens from not fully extracted entities will still be counted as TPs (true positives))"
]
},
{
Expand Down Expand Up @@ -354,15 +354,8 @@
"id": "6T4aceh89l_8"
},
"source": [
"To train the model on your data, you need to change the path to the training data in the *config_file*. "
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "5BC6SQW-9l_8"
},
"source": [
"To train the model on your data, you need to change the path to the training data in the *config_file*.\n",
" \n",
"Parse the *config_file* and change the path to your data from Python."
]
},
Expand Down Expand Up @@ -391,7 +384,7 @@
"\n",
"model_config = parse_config('ner_ontonotes_bert_torch')\n",
"\n",
"# dataset that the model was trained on\n",
"# dataset that the model was trained on\n",
"print(model_config['dataset_reader']['data_path'])"
]
},
Expand Down Expand Up @@ -424,7 +417,7 @@
"outputs": [],
"source": [
"# provide a path to the train file\n",
"model_config[\"dataset_reader\"][\"data_path\"] = \"contents/train.txt\""
"model_config['dataset_reader']['data_path'] = 'contents/train.txt'"
]
},
{
Expand Down Expand Up @@ -482,7 +475,7 @@
"id": "NhubTsRJ9mAA"
},
"source": [
"The source text is **tokenized** and **tagged**. For each token, there is a tag with BIO markup. Tags are separated from tokens with **whitespaces**. Sentences are separated with **empty lines**."
"The source text is **tokenized** and **tagged**. For each token, there is a tag with **BIO** markup. Tags are separated from tokens with **whitespaces**. Sentences are separated with **empty lines**."
]
},
{
Expand Down Expand Up @@ -575,7 +568,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The table presents a list of all of the NER-models available in DeepPavlov Library."
"The table presents a list of all of the NER-models available in the DeepPavlov Library."
]
},
{
Expand Down Expand Up @@ -630,8 +623,8 @@
"| **TIME** | Times smaller than a day |\n",
"| **PERCENT** | Percentage (including “%”) |\n",
"| **MONEY** | Monetary values, including unit |\n",
"| **QUANTITY** | Measurements, as of weight or distance |\n",
"| **ORDINAL** | “first”, “second” |\n",
"| **QUANTITY** | Measurements such as weight or distance |\n",
"| **ORDINAL** | “first”, “second”, etc. |\n",
"| **CARDINAL** | Numerals that do not fall under another type |"
]
}
Expand Down
10 changes: 5 additions & 5 deletions docs/features/models/SQuAD.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
},
"source": [
"First make sure you have the DeepPavlov Library installed.\n",
"[More info about the first installation](http://docs.deeppavlov.ai/en/master/intro/installation.html)"
"[More info about the first installation.](http://docs.deeppavlov.ai/en/master/intro/installation.html)"
]
},
{
Expand Down Expand Up @@ -192,7 +192,7 @@
"id": "i6hPLgzvpBpn"
},
"source": [
"`squad_torch_bert` here is the name of the model's *config_file*. [What is a Config File?](http://docs.deeppavlov.ai/en/master/intro/configuration.html) \n",
"`squad_bert` is the name of the model's *config_file*. [What is a Config File?](http://docs.deeppavlov.ai/en/master/intro/configuration.html) \n",
"\n",
"Configuration file defines the model and describes its hyperparameters. To use another model, change the name of the *config_file* here and further.\n",
"The full list of the models with their config names can be found in the [table](#6.-Models-list)."
Expand Down Expand Up @@ -245,7 +245,7 @@
"id": "ec572M3jpBpp"
},
"source": [
"**Input**: List[context, question]\n",
"**Input**: List[context], List[question]\n",
"\n",
"**Output**: List[answer, start_character, logit]"
]
Expand Down Expand Up @@ -291,7 +291,7 @@
"id": "iE3j768spBps"
},
"source": [
"You can also get predictions in an interactive mode through CLI."
"You can also get predictions in an interactive mode through CLI (Command Line Interface)."
]
},
{
Expand Down Expand Up @@ -453,7 +453,7 @@
"outputs": [],
"source": [
"# provide a path to the train file\n",
"model_config[\"dataset_reader\"][\"data_path\"] = \"/contents/train-v1.1.json\""
"model_config['dataset_reader']['data_path'] = '/contents/train-v1.1.json'"
]
},
{
Expand Down
Loading