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

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

by 이창현, 앨릭스 토머스
August 2021
Beginner to intermediate
440 pages
10h 4m
Korean
Hanbit Media, Inc.
Content preview from 스파크를 이용한 자연어 처리 : 대규모 텍스트를 다루는 가장 효율적인 딥러닝을 만나다
183
6
장
정보 검색
6.2
벡터 공간 모델
이전 장에서는 문서의 벡터화 개념을 소개했다. 우리는 이진 벡터를 만드는 방법을 이야기했
다. 여기서
1
은 단어가 문서에 있다는 의미다. 또한 개수를 사용할 수도 있다.
말뭉치를 벡터 모음으로 변환할 때 우리는 언어를 벡터 공간으로 암묵적으로 모델링한다. 이
벡터 공간에서 각 차원은 하나의 항을 나타내는데, 여기에는 많은 장단점이 있다. 이것은 머신
러닝 알고리즘이 작동하게 하는 방식으로 텍스트를 표현하는 간단한 방법이다. 또한 벡터를 희
소하게 표현할 수도 있다. 반면 우리는 어순
word
order
에 포함된 정보를 잃어버린다. 또한 이 프
로세스는 일부 알고리즘에 문제가 될 수 있는 고차원 데이터를 생성한다.
데이터의 벡터를 계산해보자. 이전 장에서는 이를 위해
CountVectorizer
를 사용했다. 우리
는 파이썬으로 벡터를 만들겠지만, 벡터를 빌드하는 방식은 라이브러리가 벡터화를 구현하는
방법을 이해하는 데 도움이 될 것이다.
class SparseVector(object):
def __init__(self, indices, values, length):
# if the indices are not in ascending order, we need
# to sort them
is_ascending = ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

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

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

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

Publisher Resources

ISBN: 9791162244654