andela/dictionary 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

andela/dictionary

Composer 安装命令:

composer require andela/dictionary

包简介

An Urban Dictionary Agnostic PHP Package

README 文档

README

#Urban Dictionary

The Dictionary is a PHP agnostic package that returns meaning of slangs and sample usage of the slang.

#Design

Classes

  • Data: The Data Class that houses the dictionary array
  • Dictionary: This is the Class that houses the five core methods of the application which are as follows -addWord($word); -updateWord($word); -findWord($word); -removeWord($word); -rankWords($sentence)

#Testing

The framework for testing this application is phpunit and the TDD principle was used to make sure that the code was well tested.

php vendor/phpunit/phpunit/phpunit

#Install

  • To install this package from packagelist, PHP 5.0+ and Composer are required
composer require andela/dictionary

#Install

The sample codes below shows how to use this package

  • To instantiate the Dictionary Class
 $dictionary = new \Andela\Dictionary\Dictionary();
  • To add the slang "park", it's meaning "Tell someone to relax", and sample usage "Guy park well o"
$dictionary->addWord('park', 'Tell someone to relax', 'Guy park well o')
  • To update the slang "park"

    $dictionary->updateWord('park', 'A car park', 'An updated Test');
    
  • To find the slang "park"

    $dictionary->findWord('park');
    
  • To remove the slang "park"

    $dictionary->removeWord('park');
    
  • To test for word ranking

    $word = new \Andela\Dictionary\Dictionary();
    $word->rankWords("Hello it is nice to tell if it is cool to say rubbish");
    

Change log

Please refer to CHANGELOG file for information on what has changed recently.

Contributing

Please check out CONTRIBUTING file for detailed contribution guidelines.

Credits

Andela urban Dictionary is maintained by Chidozie Ijeomah.

License

Andela urban Dictionary is released under the MIT Licence. See the bundled LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固