2016년 6월 3일 금요일

문서간 유사율 측정 방식 알고리즘 - Dice coefficient

프로그램 개발하다 두 String 간의 유사도를 측정하는  어플리케이션을 개발하게 되었는데 단순 측정용으로 많이들 사용하는 Dice coefficient 알고리즘을 도입하여 사용했습니다.

다음은 어플리케이션 사용 고객에게서 받은 질의에 답한 내용인데, 이해에 도움이 될것 같아 블로그에 옮깁니다.

==== 답변 내용  ====

안녕하세요. OOO OO 님.

저희가 사용하는 문서 중복율 체크 로직은 문서간 유사도 측정 방식중 하나인 Dice coefficient 알고리즘을 사용합니다.

Wiki는 아래 URL 참조..

https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient

원문에 나와있듯이 Dice coefficient 로직은 문서내의 모든 문자를 Bigram set 으로 만들어 공식에 대입하여 유사도를 측정합니다.

형태소 분석이나 단어의 의미와는 전혀 상관없는 단순 측정 방식이죠..

예를들어 "night" 이라는 단어와 "nacht" 라는 단어의 유사도 산출시 25%의 유사도를 말하는 기준은 원문에 잘 나와있지만 아래 그림을 참고 하시면 이해가 쉬울것 같습니다.




아래는 유사율이 나오는 공식을 잘 설명해 줍니다.





아래 그림은 테스트용 원문으로 유사율 비교시 나오는 결과 입니다. 붉은색으로 표기된 부분이 원문과 차이 있는 부분.





업무에 참고하시기 바랍니다.




댓글 7개:

  1. Read all the information that i've given in above article. It'll give u the whole idea about it.
    python training in pune | python training institute in chennai | python training in Bangalore

    답글삭제
  2. Great Information's are shared...Python is a Best Scripting languages comparing to all.It is very Ease and make concepts to understand quickly...Good Feature is waiting for you Click more to Grasp about it
    python training in chennai | python training in annanagar | python training in omr | python training in porur | python training in tambaram | python training in velachery

    답글삭제
  3. Great Information's are shared...Python is a Best Scripting languages ​​comparing to all.It is very Ease and make concepts to understand quickly...Good Feature is waiting for you Click more to Grasp about it
    hardware and networking training in chennai

    hardware and networking training in omr

    xamarin training in chennai

    xamarin training in omr

    ios training in chennai

    ios training in omr

    iot training in chennai

    iot training in omr

    답글삭제