Skip to content

영어 처리 과정에서 오류가 있습니다. [english.py] #14

@5Hyeons

Description

@5Hyeons

eng_words = set(re.findall("[A-Za-z']+", string))

정규식 내에 따옴표 ' 때문에 영어 처리가 제대로 이루어지지 않습니다.
위를 그대로 사용할 경우
Input : the shawshank redemption'이다. 언뜻 생각하면 'escape'를 썼을 법한데 'redemption'을 썼다. redemption의 사전적 의미는 구원, 속죄, 회복이다.
output : 'the 쇼섄크 리뎀프션'이다. 언뜯 쌩가카면 'escape'를 써쓸 뻐판데 '리뎀프션'을 썯따. 리뎀프셔늬 사전저 긔미는 구원, 속쬐, 회보기다.

아무래도 대괄호를 닫는 과정에서 오타를 넣으신 것 같습니다.

따라서 eng_words = set(re.findall("[A-Za-z]+", string))로 수정하면 좋을 듯합니다.

수정 후 output : '더 쇼섄크 리뎀프션'이다. 언뜯 쌩가카면 '이스케이프'를 써쓸 뻐판데 '리뎀프션'을 썯따. 리뎀프셔늬 사전저 긔미는 구원, 속쬐, 회보기다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions