Create sequence
Browse files
sequence
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
token_lens = []
|
| 2 |
+
|
| 3 |
+
for txt in data.Text:
|
| 4 |
+
tokens = bert_tokenizer.encode(txt)
|
| 5 |
+
token_lens.append(len(tokens))
|
| 6 |
+
|
| 7 |
+
sns.histplot(token_lens, kde=True, stat='density', linewidth=0)
|
| 8 |
+
plt.xlim([0, 100]);
|
| 9 |
+
plt.xlabel('Token count');
|