<?php
echo similar_text("Hello World","Hello Peter");
?>
Output: 7
<?php
echo similar_text("Pello World","Hello Weter");
?>
Output: 6, because the letters are not in the correct order.
<?php
similar_text("Hello World","Hello Peter",$percent);
echo $percent;
?>
Output: 63.6363636364
PHP similar_text algorithm
The similar_text returns the number of matching letters of two strings. It can also calculate the similarity of the two strings in percent (matched letters count/average length of two letters)*100. For example,
Subscribe to:
Post Comments (Atom)
-
음성 인공지능 분야에서 스타트업이 생각해볼 수 있는 전략은 아마 다음과 같이 3가지 정도가 있을 것이다: 독자적 Vertical 음성 인공지능 Application 구축 기 음성 플랫폼을 활용한 B2B2C 형태의 비지니스 구축 기 음성 플랫폼...
-
Opening the black box of Deep Neural Networks via Information - https://arxiv.org/pdf/1703.00810.pdf 지금까지 딥 러닝은 어떻게 동작하는지 이해할 수 없다고 믿어져왔다...
-
점심 먹고 서점에 들러서 집어든 책이 하나 있다. "인간 본성의 법칙", 몇 장 읽어보면서 바로 몰입되는 책. 아직 다 읽지 못해서 리뷰 하긴 뭐 하지만, 과거 내 행동들에 대한 부끄러움, 감정을 배제한 이성적 의사결정에 큰 깨달음을...
No comments:
Post a Comment