Skip to content

Instantly share code, notes, and snippets.

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
speed dist
4 2
4 10
7 4
7 22
8 16
9 10
10 18
10 26
10 34
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
> 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
(earthweb1)jmair:earthweb jae-myoungyu$ earthreader server --debug ~/Dropbox/rss
Traceback (most recent call last):
File "/Users/jae-myoungyu/ENV/earthweb1/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
File "/Users/jae-myoungyu/repo/earthreader/earthweb/earthreader/web/wsgi.py", line 59, in __call__
File "/Users/jae-myoungyu/ENV/earthweb1/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
File "/Users/jae-myoungyu/ENV/earthweb1/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
(earthweb1)jmair:earthweb jae-myoungyu$ earthreader server ~/Dropbox/rss
serving on http://0.0.0.0:5000
ERROR:waitress:Exception when serving /entries/
Traceback (most recent call last):
File "/Users/jae-myoungyu/ENV/earthweb1/lib/python2.7/site-packages/waitress/channel.py", line 337, in service
task.service()
File "/Users/jae-myoungyu/ENV/earthweb1/lib/python2.7/site-packages/waitress/task.py", line 173, in service
self.execute()
File "/Users/jae-myoungyu/ENV/earthweb1/lib/python2.7/site-packages/waitress/task.py", line 392, in execute
app_iter = self.channel.server.application(env, start_response)