Skip to content

Instantly share code, notes, and snippets.

> summary(lm(salary ~ log(company) + log(career) + log(usage), salary))
Call:
lm(formula = salary ~ log(company) + log(career) + log(usage),
data = salary)
Residuals:
Min 1Q Median 3Q Max
-3395.1 -1273.9 -309.8 1287.5 6695.5
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
speed dist
4 2
4 10
7 4
7 22
8 16
9 10
10 18
10 26
10 34
import re
class TokenAlignPreprocessor:
def __init__(self, tokenizer, pre_tokenizer, outside_label_id):
self.tokenizer = tokenizer
self.pre_tokenizer = pre_tokenizer
self.outside_label_id = outside_label_id
def align_label(self, word, word_tokens, char_labels):
i = j = 0