semvec/pypi-packages huggingface dataset:
foliantcontrib.yaml-include 1.0.1
Extension for Foliant documentation tool to include YAML-files in config and xml-tag parameters.
License: MIT

[![](https://img.shields.io/pypi/v/foliantcontrib.yaml_include.svg)](https://pypi.org/project/foliantcontrib.yaml_include/)  [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.yaml_include.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.yaml_include)

# YAMLInclude Extension

YAMLInclude is a configuration extension for Foliant to include parts of configuration from YAML-files.

It resolves `!include` YAML tag in the project config and inside XML-tags parameters.

## Installation

```bash
$ pip install foliantcontrib.yaml_include
```

## Usage

The syntax of the `!include` YAML tag is:

`!include <file>[#<key>]`

Where `file` may be

- path to local file in Foliant project root,
- direct link to a file on remote server.

An optional `#<key>` part is used to get a key from the mapping stored inside `<file>`.

**Including a local file**

Config example:

```yaml
chapters: !include chapters.yml
```

In this example the `chapters.yml` file should be placed in your Foliant project root.

if the contents of `chapters.yml` are as follows:

```yaml
# chapters.yml

- index.md
- description.md
```

then the resulting config after applying the extension will be:

```yaml
chapters:
    - index.md
    - description.md
```

**Including part of a local file**

Config example:

```yaml
chapters: !include chapters.yml#chapters_for_pdf
```

In this example the `chapters.yml` file should be placed in your Foliant project root. 

if the contents of `chapters.yml` are as follows:

```yaml
# chapters.yml

chapters_for_site:
    - index_site.md
    - description_site.md
chapters_for_pdf:
    - index.md
    - description.md
```

then the resulting config after applying the extension will be:

```yaml
chapters:
    - index.md
    - description.md
```

**Including a remote file**

Config example:

```yaml
chapters: !include http://example.com/chapters.yml
```

In this example the `chapters.yml` file is stored on the website `http://example.com/`.

if the contents of `chapters.yml` are as follows:

```yaml
# chapters.yml

- index.md
- description.md
```

then the resulting config after applying the extension will be:

```yaml
chapters:
    - index.md
    - description.md
```

**Including part of a remote file**

Config example:

```yaml
chapters: !include http://example.com/chapters.yml#chapters_for_pdf
```

In this example the `chapters.yml` file is stored on the website `http://example.com/`.

if the contents of `chapters.yml` are as follows:

```yaml
# chapters.yml

chapters_for_site:
    - index_site.md
    - description_site.md
chapters_for_pdf:
    - index.md
    - description.md
```

then the resulting config after applying the extension will be:

```yaml
chapters:
    - index.md
    - description.md
```
davat 0.0.8
davat(دوات) is a very simple tools for normalizeing and cleaning Persian text
License: MIT

Davat(دوات)
====

A very simple python library for normalizing and cleaning Persian text.

+ Text Normalizing
+ Text Cleaning
+ Python 3.x support


## Usage

```python3
>>> import davat

>>> sample_text = "بِسْمِ اللَّهِ الرَّحْمنِ الرَّحِيمِ"

>>> davat.normalize(sample_text)
'بسم الله الرحمن الرحیم'

>>> sample_text = """این یك متن تست است که حروف عربي ، کشیـــــده 
'اعداد 12345' و... دارد     که می خواهیم آن را نرمالایز کنیم ."""

>>> print(davat.normalize(sample_text))
این یک متن تست است که حروف عربی، کشیده
«اعداد ۱۲۳۴۵» و …  دارد  که می‌خواهیم آن را نرمالایز کنیم.

>>> sample_text = """
... متنی برای برسی تابع تمیز کردن متن
... که #هشتگ_ها را خیلی عاااااللللییییی!!!! تبدیل به متن عادی می‌کند!
... منشن‌ها @mh_salari و لینک‌ها www.mh-salari.ir را حذف می‌کند.
... حروف غیر فارسی  a b c d و اموجی‌ها :( 🐈‍ را حذف می‌کند
... علائم دستوری/نگارشی ?!٫ را حذف نمی‌کند
... و ...
... http://localhost:8888
... """


>>> # davat.clean(
... #     text: str,
... #     remove_links=True,
... #     remove_mentions=True,
... #     remove_hashtags=False,
... #     remove_hashtag=True,
... #     remove_underline=True,
... #     remove_emojis=True,
... #     normalize_persian=True,
... #     remove_punctuations=False,
... #     fix_multiple_punctuations=True,
... #     remove_3dots=False,
... #     remove_non_persian_letters=True,
... #     remove_extraspaces=True,
... #)
... 


>>> text = davat.clean(sample_text)
>>> print(text)
متنی برای برسی تابع تمیز کردن متن 
 که هشتگ‌ها را خیلی عااللیی! تبدیل به متن عادی می‌کند! 
 منشن‌ها و لینک‌ها را حذف می‌کند. 
 حروف غیر فارسی و اموجی‌ها را حذف می‌کند 
 علائم دستوری/نگارشی؟!، را حذف نمی‌کند 
 و …

```


## Installation
The latest stable version of Davat can be installed through `pip`:

	pip install davat


## Thanks to:
+ [Persian poems corpus](https://github.com/amnghd/Persian_poems_corpus/blob/master/pers_alphab.py)
+ [Hazm](https://github.com/sobhe/hazm/blob/master/hazm/Normalizer.py)
+ [parsivar](https://github.com/ICTRC/Parsivar/blob/master/parsivar/normalizer.py)