Skip to content

Commit d405f9a

Browse files
committed
Docs: Typos
1 parent b99f0fd commit d405f9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/source/explanation/postprocessing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ Construct names from NAME groups
105105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106106

107107
From the name groups, we construct the ingredient names.
108-
This is more easily done by iterating in reverse over the groups and applying the following logic:
108+
This is most easily done by iterating in reverse over the groups and applying the following logic:
109109

110110
* Each group starting with B_NAME_TOK forms a new name.
111-
* Each NAME_VAR group is prepended to the beginning of the more recent name.
112-
* Each NAME_MOD group is prepended to all previous name groups.
111+
* Each NAME_VAR group is prepended to the beginning of the most recent name.
112+
* Each NAME_MOD group is prepended to all previous names.
113113

114114
The output from this construction step are groups of indices, where each group represents an ingredient name.
115115

@@ -125,7 +125,7 @@ For the example sentence, the constructed groups of indices are:
125125
Create :class:`IngredientText` objects
126126
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127127

128-
With the group of indices obtained from the previous step, we can convert these to token indices and then follow the steps used to post-process the SIZE, PREP, PURPOSE, COMMENT labels described above.
128+
With the groups of indices obtained from the previous step, we can convert to token indices and then follow the steps used to post-process the SIZE, PREP, PURPOSE, COMMENT labels described above.
129129

130130
Once the :class:`IngredientText` objects have been obtained, we perform one final post-processing step. If there are multiple names, we check the part of speech tag for the last token in each name. If the part of speech tag is **IN**, **DT** or **JJ**, we merge the name with the next name. This merging of ingredient names is necessary to mitigate against mislabelling of tokens by the model, which can happen if a name is split by a token with another label.
131131

0 commit comments

Comments
 (0)