SudharsanSundar commited on
Commit
5aa242c
1 Parent(s): d866e28

Updated markdown

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -6,24 +6,19 @@ with gr.Blocks() as demo:
6
  gr.Markdown(
7
  """
8
  # Token Edit Distance
9
- <br/><br/>
10
  This is an NLP evaluation metric that records the minimum number of token edits (insertions, deletions, and replacements, all weighted equally) to the prediction string in order to make it exactly match the reference string. Uses identical logic to Levenshtein Edit Distance, except applied to tokens (i.e. individual ints in a list) as opposed to individual characters in a string.
11
- <br/><br/>
12
- *Args*:
13
  * predictions: ```List[List[Int]]```, list of predictions to score.
14
  * Each prediction should be tokenized into a list of tokens.
15
  * references: ```List[List[Int]]```, list of references/ground truth output to score against.
16
  * Each reference should be tokenized into a list of tokens.
17
 
18
- <br/><br/>
19
-
20
- *Returns*:
21
  * "avg_token_edit_distance": ```Float```, average Token Edit Distance for all inputted predictions and references
22
  * "token_edit_distances": ```List[Int]```, the Token Edit Distance for each inputted prediction and reference
23
 
24
- <br/><br/>
25
-
26
- *Examples*:
27
  ```
28
  >>> token_edit_distance_metric = datasets.load_metric('Token Edit Distance')
29
  >>> references = [[15, 4243], [100, 10008]]
 
6
  gr.Markdown(
7
  """
8
  # Token Edit Distance
 
9
  This is an NLP evaluation metric that records the minimum number of token edits (insertions, deletions, and replacements, all weighted equally) to the prediction string in order to make it exactly match the reference string. Uses identical logic to Levenshtein Edit Distance, except applied to tokens (i.e. individual ints in a list) as opposed to individual characters in a string.
10
+
11
+ ## Args:
12
  * predictions: ```List[List[Int]]```, list of predictions to score.
13
  * Each prediction should be tokenized into a list of tokens.
14
  * references: ```List[List[Int]]```, list of references/ground truth output to score against.
15
  * Each reference should be tokenized into a list of tokens.
16
 
17
+ ## Returns:
 
 
18
  * "avg_token_edit_distance": ```Float```, average Token Edit Distance for all inputted predictions and references
19
  * "token_edit_distances": ```List[Int]```, the Token Edit Distance for each inputted prediction and reference
20
 
21
+ ## Examples:
 
 
22
  ```
23
  >>> token_edit_distance_metric = datasets.load_metric('Token Edit Distance')
24
  >>> references = [[15, 4243], [100, 10008]]