https://github.com/hctilg/number-to-text
converts numbers to persian text.
https://github.com/hctilg/number-to-text
api number-to-text persian-nlp php
Last synced: about 1 year ago
JSON representation
converts numbers to persian text.
- Host: GitHub
- URL: https://github.com/hctilg/number-to-text
- Owner: hctilg
- License: mit
- Created: 2023-09-09T09:38:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-18T15:55:57.000Z (almost 3 years ago)
- Last Synced: 2025-04-12T08:18:24.500Z (about 1 year ago)
- Topics: api, number-to-text, persian-nlp, php
- Language: PHP
- Homepage: https://packagist.org/packages/hctilg/number-to-persian-text
- Size: 70.3 KB
- Stars: 27
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# number-to-text
converts numbers to persian text.
## Usage
### Library
Simply use:
```php
// checking the exists Library.
if (!file_exists("number-to-text.php")) {
copy('https://raw.githubusercontent.com/hctilg/number-to-text/main/number-to-text.php', 'number-to-text.php');
}
// require Library.
require_once('number-to-text.php');
$input = '';
$output = number_to_text($input);
echo "Text: $output";
```
### API
Send requests to `/number-to-text.php`.
| Method | Parameter |
|:---------|:---------:|
| GET/POST | `string` number |

### CLI
run php script:
```bash
php number-to-text.php
```

## Test
### Web
Go to the `./number-to-text` folder and run php localhost:
```bash
php -S localhost:6040
```
then open the following url
```
http://localhost:6040/test.php
```

### CLI
run php script:
```bash
php test.php
```
