Skip to content

형태소 분석시 빈칸을 없애는 이유를 알고 싶습니다..  #38

Open
@taeheonkwon

Description

@taeheonkwon

안녕하세요..

책의 282 page 상단의 코드에

morph_tokenized_sentences = [okt.morphs(s.replace(' ', '')) for s in sentences]

위와 같이 형태소 분리가 되어 있습니다.

그런데, 저 코드의 경우 형태소 분리의 결과는

['3', '박', '4일', '정도놀러가고싶다'] 가 됩니다.

코드에서 "s.replace(' ', '')" 과정 없이 형태소를 분리하면

['3', '박', '4일', '정도', '놀러', '가고', '싶다'] 가 됩니다.

그래서, 코드에서 "s.replace(' ', '')" 를 쓰신 이유가 무엇인지 궁금합니다...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @taeheonkwon

      Issue actions

        형태소 분석시 빈칸을 없애는 이유를 알고 싶습니다.. · Issue #38 · NLP-kr/tensorflow-ml-nlp-tf2