English
pszemraj commited on
Commit
cd0ea4a
·
verified ·
1 Parent(s): fb40c4a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -14
README.md CHANGED
@@ -59,18 +59,20 @@ print(f"Tokens:\n\t{output.input_ids}")
59
  print(f"Offsets: {offsets}")
60
  ```
61
 
62
- This should result in the following (_Nov 2023 version_):
63
 
64
- <pre>&gt;&gt;&gt; print(f&quot;Test string: {test_string}&quot;)
65
- Test string: When dealing with Varroa destructor mites, it&apos;s crucial to administer the right acaricides during the late autumn months, but only after ensuring that the worker bee population is free from pesticide contamination.
66
- &gt;&gt;&gt;
67
- &gt;&gt;&gt; # Tokens
68
- &gt;&gt;&gt; tokens = tokenizer.convert_ids_to_tokens(output[&apos;input_ids&apos;])
69
- &gt;&gt;&gt; print(f&quot;Tokens: {tokens}&quot;)
70
- Tokens: [&apos;▁When&apos;, &apos;▁dealing&apos;, &apos;▁with&apos;, &apos;▁Varroa&apos;, &apos;▁destructor&apos;, &apos;▁mites,&apos;, &quot;▁it&apos;s&quot;, &apos;▁cru&apos;, &apos;cial&apos;, &apos;▁to&apos;, &apos;▁administer&apos;, &apos;▁the&apos;, &apos;▁right&apos;, &apos;▁acar&apos;, &apos;icides&apos;, &apos;▁during&apos;, &apos;▁the&apos;, &apos;▁late&apos;, &apos;▁autumn&apos;, &apos;▁months,&apos;, &apos;▁but&apos;, &apos;▁only&apos;, &apos;▁after&apos;, &apos;▁ensuring&apos;, &apos;▁that&apos;, &apos;▁the&apos;, &apos;▁worker&apos;, &apos;▁bee&apos;, &apos;▁population&apos;, &apos;▁is&apos;, &apos;▁free&apos;, &apos;▁from&apos;, &apos;▁pesticide&apos;, &apos;▁contamination&apos;, &apos;.&apos;]
71
- &gt;&gt;&gt;
72
- &gt;&gt;&gt; # Offsets
73
- &gt;&gt;&gt; offsets = output[&apos;offset_mapping&apos;]
74
- &gt;&gt;&gt; print(f&quot;Offsets: {offsets}&quot;)
75
- Offsets: [(0, 4), (4, 12), (12, 17), (17, 24), (24, 35), (35, 42), (42, 47), (47, 51), (51, 55), (55, 58), (58, 69), (69, 73), (73, 79), (79, 84), (84, 90), (90, 97), (97, 101), (101, 106), (106, 113), (113, 121), (121, 125), (125, 130), (130, 136), (136, 145), (145, 150), (150, 154), (154, 161), (161, 165), (165, 176), (176, 179), (179, 184), (184, 189), (189, 199), (199, 213), (213, 214)]
76
- </pre>
 
 
 
59
  print(f"Offsets: {offsets}")
60
  ```
61
 
62
+ This should result in the following (_Feb '24 version_):
63
 
64
+ ```python
65
+ >>> print(f"Test string: {test_string}")
66
+ Test string: When dealing with Varroa destructor mites, it's crucial to administer the right acaricides during the late autumn months, but only after ensuring that the worker bee population is free from pesticide contamination.
67
+ >>>
68
+ >>> # Tokens
69
+ >>> tokens = tokenizer.convert_ids_to_tokens(output['input_ids'])
70
+ >>> print(f"Tokens: {tokens}")
71
+ Tokens: ['When', '▁dealing', '▁with', '▁Varroa', '▁destructor', '▁mites,', "▁it's", '▁cru', 'cial', '▁to', '▁administer', '▁the', '▁right', '▁acar', 'icides', '▁during', '▁the', '▁late', '▁autumn', '▁months,', '▁but', '▁only', '▁after', '▁ensuring', '▁that', '▁the', '▁worker', '▁bee', '▁population', '▁is', '▁free', '▁from', '▁pesticide', '▁contam', 'ination.']
72
+ >>>
73
+ >>> # Offsets
74
+ >>> offsets = output['offset_mapping']
75
+ >>> print(f"Offsets: {offsets}")
76
+ Offsets: [(0, 4), (4, 12), (12, 17), (17, 24), (24, 35), (35, 42), (42, 47), (47, 51), (51, 55), (55, 58), (58, 69), (69, 73), (73, 79), (79, 84), (84, 90), (90, 97), (97, 101), (101, 106), (106, 113), (113, 121), (121, 125), (125, 130), (130, 136), (136, 145), (145, 150), (150, 154), (154, 161), (161, 165), (165, 176), (176, 179), (179, 184), (184, 189), (189, 199), (199, 206), (206, 214)]
77
+ ```
78
+