定制 pedro-mendonca/convert-pt-ao90 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

pedro-mendonca/convert-pt-ao90

Composer 安装命令:

composer require pedro-mendonca/convert-pt-ao90

包简介

Open source language tool to convert Portuguese to AO90.

README 文档

README

Convert PT AO90

Packagist version Release Date License Packagist PHP Version Support Sponsor

Test Coding Standards Static Analysis Codacy Badge

Description

Language tool to convert text according to the Portuguese Language Orthographic Agreement of 1990 (PT AO90)

Installation instructions

Installation can be done with Composer, by requiring this package as a dependency:

composer require pedro-mendonca/convert-pt-ao90

Make sure to include composer autoload in your project:

/**
 * Include Composer autoload.
 */
require 'vendor/autoload.php';

If you don't use Composer, you can install manually by downloading the latest release, add it to your project folder and include the main file in your code:

/**
 * Include Convert-PT-AO90.
 */
require_once '<path-to-folder>/convert-pt-ao90/convert-pt-ao90.php';

Usage

Examples:

  1. Convert text string:

    $text = 'Não me pélo pelo pêlo de quem pára para resistir!';
    $string_ao90 = Convert_PT_AO90\convert_pt_ao90( $text );
    echo $string_ao90;
  2. See more examples and the complete replace pairs in the file example.php.

Changelog

1.3.4

  • Harden type checking of replace pairs.
  • Update dependencies.
  • Tested up to PHP 8.4 and 8.5.

1.3.3

  • Fix converting strings with trailing space returning null.
  • Update dependencies.
  • Add more test cases.
  • Tested up to PHP 8.3.

1.3.2

  • Fix variable type error.
  • Add some more replace pairs.
  • Rebuild replace pairs.
  • Update dependencies.
  • Tested only on supported PHP versions (7.4+).

1.3.1

  • Fix matching for words with exact case on the replace pairs.

1.3.0

  • Rebuild replace pairs with half the size.
  • Improve performance by using only lowercase replace pairs.
  • Fix matching words starting with an accented vowel.
  • Remove wrong replace pairs about cardinal points (lowercased since 1945).
  • Add some more replace pairs.
  • Update dependencies.

1.2.3

  • Rebuild replace pairs.

1.2.2

  • Fix sentence boundary issue with HTML after ending.
  • Add sentence boundary after two new lines.
  • Add more tests: new lines followed by HTML.

1.2.1

  • Fix JSON path issue when used as dependency.

1.2.0

  • Rebuild code to allow a detailed control over sentence and word boundaries.
  • Fix problem of partial find+replace of words, now only whole words can be converted.
  • Remove temporary bug fix of partial find+replace (acto->ato).
  • Update main replace pairs library.
  • Add more custom replace pairs rules.
  • Rebuild and add both replace pairs JSON, minified and source (pretty).
  • Add more tests for many different types of texts: Multiline, HTML, multiple sentences, etc.

1.1.0

  • Use a pre-built Replace Pairs JSON file to improve performance (5x faster).
  • Simplify Replace Pairs data.
  • Bump minimum PHP to 7.2.
  • Add Tests! Run the Convert PT AO90 against a set of text strings with expected results.
  • Add some custom replace pairs rules.

1.0.3

  • Move CI to GitHub Actions.
  • Bump PHPStan Level to 9.
  • Add Markdownlint and PHPMD.
  • Fix coding standards.

1.0.2

  • Fix autoload and library path for package installed as composer dependency.

1.0.1

  • Add Composer install support.

1.0.0

  • Initial release.

pedro-mendonca/convert-pt-ao90 适用场景与选型建议

pedro-mendonca/convert-pt-ao90 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.34k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2020 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 pedro-mendonca/convert-pt-ao90 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pedro-mendonca/convert-pt-ao90 我们能提供哪些服务?
定制开发 / 二次开发

基于 pedro-mendonca/convert-pt-ao90 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2020-10-15