承接 famelo/string-score 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

famelo/string-score

Composer 安装命令:

composer require famelo/string-score

包简介

Extension to fetch Avatars from different sources

README 文档

README

Quicksilver style string scoring based on https://github.com/joshaven/string_score

Examples


use Famelo\StringScore\StringScore;

StringScore::score("hello world", "axl") //=> 0
StringScore::score("hello world", "ow")  //=> 0.35454545454545455

// And then there is fuzziness
StringScore::score("hello world", "hello wor1")  	//=>0  (the "1" in place of the "l" makes a mismatch)
StringScore::score("hello world", "hello wor1",0.5)  //=>0.6081818181818182 (fuzzy)

// Considers string length
StringScore::score('Hello', 'h') //=>0.52
StringScore::score('He', 'h')    //=>0.6249999999999999  (better match becaus string length is closer)

// Same case matches better than wrong case
StringScore::score('Hello', 'h') //=>0.52
StringScore::score('Hello', 'H') //=>0.5800000000000001

// Acronyms are given a little more weight
StringScore::score("Hillsdale Michigan", "HiMi") > "Hillsdale Michigan", "Hills")
StringScore::score("Hillsdale Michigan", "HiMi") < "Hillsdale Michigan", "Hillsd")

统计信息

  • 总下载量: 155
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-06-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固