Skip to Content
스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다
book

스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다

by 이창현, 앨릭스 토머스
August 2021
Beginner to intermediate content levelBeginner to intermediate
440 pages
10h 4m
Korean
Hanbit Media, Inc.
Content preview from 스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다
250
2
빌딩 블록
for i in range(len(text) - len(term) + 1):
j = i+len(term)
end_of_word = j == len(text) or not text[j].isalpha()
begin_of_word = i == 0 or not text[i-1].isalpha()
if begin_of_word and \
end_of_word and \
term == text[i:i+len(term)]:
yield (term, i, j)
timing = []
for texts in [raw_10, raw_50, raw_100]:
start = time() # milliseconds
references = get_match_counts(texts, simple_match, en_stopwords)
timing.append((len(texts), int(time() - start) * 1000))
print('the', sum(references['the'].values()))
print('about', sum(references['about'].values()))
print('wouldn\'t', sum(references['wouldn\'t'].values()))
print('{} documents in {} ms'.format(*timing[-1])) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

정원천, 보리스 숄, 트렌트 스완슨, 피터 야우쇼베츠

Publisher Resources

ISBN: 9791162244654