# HintlyDataAnalisys Documentation
This library is designed to process and analyze text data, perform mathematical computations, and integrate plugins for custom operations. The library supports text normalization, counting specific characters or words, and providing basic mathematical operations like mean, difference, normalization, and more. Additionally, the MatchMaker class allows for text manipulation based on pre-configured rules stored in JSON files.
## Table of contents
- [Variables](#1-global-variables)
- [Classes](#2-classes)
- [Math](#21-math)
- [Text](#22-text)
- [MatchMaker](#23-matchmaker)
- [Plugins](#24-plugins-nested-in-matchmaker)
- [timeLib](#25-timelib-nested-in-matchmaker)
- [API](#api-documentation)
- [Math](#math-operations)
- [Text](#text-operations)
- [MatchMaker](#matchmaker)
- [Plugins](#plugins)
- [Authors](#authors)
- [License](#license)
- [Future Plans](#future-plans)
## 1. **Global Variables**
- **`intrepunctions`**: A list of punctuation marks used for text analysis (e.g., ".", ",", ":", "?", etc.).
- **`whiteSigns`**: A list of whitespace characters (e.g., " ", "\n", etc.).
- **`data`**: JSON data loaded from the file `matchmaker.json` that stores configuration settings.
## 2. **Classes**
#### **2.1. Math**
This class contains mathematical operations for analyzing numerical data.
- **`Mean(analisysData: list)`**: Returns the average of a list of numbers.
- **`Difference(a, b)`**: Calculates the percentage difference between two values `a` and `b`.
- **`Normalize(analisysData: list, normalizeNumber: int)`**: Normalizes the values in `analisysData` to a scale defined by `normalizeNumber`.
- **`MakeInt(value: float, divideNumber: int)`**: Converts a float to an integer by rounding after subtracting `divideNumber`.
- **`AbsoluteDifference(a, b)`**: Returns the absolute difference between two values.
- **`AbsoluteIntPercentDifference(a, b)`**: Returns the absolute percentage difference, converted to an integer.
- **`WeightedAverage(analisysData: list, weights: list)`**: Computes the weighted average of the given data.
- **`NumberRepeat(numbers: list)`**: Returns a dictionary with the count of occurrences of each number in `numbers`.
- **`PercentNumberChance(numbers: list)`**: Returns a dictionary showing the probability (as a percentage) of each number appearing in `numbers`.
#### **2.2. Text**
This class provides utilities for text analysis and manipulation.
- **`CountInterpunctions(text: str)`**: Returns a dictionary with the count of each punctuation mark from `intrepunctions` in the provided `text`.
- **`CountSigns(text: str, lowerSigns: bool)`**: Returns a dictionary of character counts in `text`, either case-sensitive or case-insensitive based on the `lowerSigns` flag.
- **`CountWord(text: str, word: str)`**: Returns the number of times a word appears in the provided `text`.
- **`FilterWordsWithSign(text: str, sign: str, filterType: FilterType)`**: Based on `filterType`, either counts or removes the occurrences of a word (`sign`) from `text`.
- **`NormalizeText(text: str, normalizeType: NormalizeType)`**: Performs various normalization actions (such as deleting punctuation or changing text to lowercase) based on the specified `normalizeType`.
- **`GetWordsFromText(text: str)`**: Splits the provided text into a list of words.
#### **2.3. MatchMaker**
This class is responsible for more advanced text manipulation, including hidden text processing and splitting based on specific rules.
- **`MMSplitText(text: str)`**: Splits the text based on a key defined in the `matchmaker.json` file and returns a list of text segments.
- **`MMHiddenText(text: str)`**: Removes hidden parts of the text enclosed by specific start and end markers from `matchmaker.json`.
- **`MMPasswordText(text: str)`**: Replaces the content between specific markers (start and end) with asterisks for obfuscation.
#### **2.4. Plugins (Nested in MatchMaker)**
This class manages external plugins that can extend the library's functionality.
- **`InstallPlugin(name: str)`**: Installs a plugin by importing it and updating the `matchmaker.json` file.
#### **2.5. timeLib (Nested in MatchMaker)**
This class allows for time-based text operations if the `timeLib` plugin is installed.
- **`Detect(text: str)`**: Detects and replaces time tags in the text if the `timeLib` plugin is available.
## API Documentation
#### **Math Operations**
1. **`Mean(analisysData: list) -> float`**: Calculate the mean of a list of numbers.
```python
Math.Mean([1, 2, 3, 4, 5]) # Returns: 3.0
```
2. **`Difference(a: float, b: float) -> float`**: Calculate the percentage difference between `a` and `b`.
```python
Math.Difference(50, 100) # Returns: 100.0
```
3. **`Normalize(analisysData: list, normalizeNumber: int) -> list`**: Normalize a list of numbers to a specified range.
```python
Math.Normalize([1, 2, 3], 10) # Returns: [3.33, 6.67, 10]
```
4. **`AbsoluteDifference(a: float, b: float) -> float`**: Return the absolute difference between two values.
```python
Math.AbsoluteDifference(5, 10) # Returns: 5
```
5. **`WeightedAverage(analisysData: list, weights: list) -> float`**: Calculate the weighted average of a list.
```python
Math.WeightedAverage([3, 4, 5], [1, 2, 1]) # Returns: 4.0
```
6. **`NumberRepeat(numbers: list) -> dict`**: Return a dictionary with the number of times each number appears in the list.
```python
Math.NumberRepeat([1, 2, 2, 3]) # Returns: {1: 1, 2: 2, 3: 1}
```
#### **Text Operations**
1. **`CountInterpunctions(text: str) -> dict`**: Count how many times each punctuation appears in the text.
```python
Text.CountInterpunctions("Hello, world!") # Returns: {",": 1, "!": 1}
```
2. **`CountSigns(text: str, lowerSigns: bool) -> dict`**: Count each character's appearance in the text, either case-sensitive or case-insensitive.
```python
Text.CountSigns("Hello", True) # Returns: {"h": 1, "e": 1, "l": 2, "o": 1}
```
3. **`CountWord(text: str, word: str) -> int`**: Count how many times a word appears in the text.
```python
Text.CountWord("This is a test. This test is simple.", "test") # Returns: 2
```
4. **`NormalizeText(text: str, normalizeType: NormalizeType) -> str`**: Normalize text by performing actions such as removing punctuation or converting text to lowercase.
```python
Text.NormalizeText("Hello, World!", NormalizeType.LowText) # Returns: "hello, world!"
```
#### **MatchMaker**
1. **`MMSplitText(text: str) -> list`**: Split text based on a key defined in the `matchmaker.json` file.
```python
MatchMaker.MMSplitText("Hello world!") # Returns: list of segments based on key
```
2. **`MMHiddenText(text: str) -> str`**: Remove hidden text segments enclosed by specified markers.
```python
MatchMaker.MMHiddenText("This is {hd}secret{/hd} text.") # Returns: "This is text."
```
3. **`MMPasswordText(text: str) -> str`**: Obfuscate text between markers with asterisks.
```python
MatchMaker.MMPasswordText("Password is {password}12345|{/password} hidden.") # Returns: "Password is ***** hidden."
```
#### **Plugins**
1. **`InstallPlugin(name: str)`**: Install and integrate an external plugin into the library.
```python
MatchMaker.Plugins.InstallPlugin("example_plugin")
```
## Authors
#### Franciszek Chmielewski (ferko2610@gmail.com)
## License
All in LICENSE file.
MIT Licence
Copyright (c) 2024 Franciszek Chmielewski.
Permission is hereby granted to anyone who obtains a copy of this software and associated documentation files (the ‘Software’) to use the Software for personal purposes only, subject to the following conditions:
1. The Software may not be copied, reproduced, modified or distributed in any form without the prior written consent of the author.
2. It is not permitted to publish, sublicense, sell, share or transfer the Software to others without the written consent of the author.
3. It is prohibited to decompile, reverse engineer, modify or create derivative works based on the Software.
<b>THE SOFTWARE IS PROVIDED ‘AS IS’ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIMS, DAMAGES OR OTHER LIABILITIES, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING OUT OF OR RELATING TO THE SOFTWARE OR THE USE OR OTHER ACTIVITIES IN THE SOFTWARE.</b>
## Future Plans
#### Roadmap: [Roadmap](https://trello.com/b/dJ2B3uSM/hintlydataanalisys)
- Adding more mathematical tools
- Adding more text tools
- Adding more plug-ins to MatchMaker.
- Adding functions to MatchMaker.
Raw data
{
"_id": null,
"home_page": null,
"name": "HintlyDataAnalisys",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "mathematics analysis text data ai",
"author": "Franciszek Chmielewski",
"author_email": "ferko2610@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/38/f7e836628f4fec042dbde16e56f5be697eb074612e5207df59a5ae8fb64c/hintlydataanalisys-0.4.2.4.tar.gz",
"platform": null,
"description": "# HintlyDataAnalisys Documentation\r\n\r\nThis library is designed to process and analyze text data, perform mathematical computations, and integrate plugins for custom operations. The library supports text normalization, counting specific characters or words, and providing basic mathematical operations like mean, difference, normalization, and more. Additionally, the MatchMaker class allows for text manipulation based on pre-configured rules stored in JSON files.\r\n\r\n## Table of contents\r\n - [Variables](#1-global-variables)\r\n - [Classes](#2-classes)\r\n - [Math](#21-math)\r\n - [Text](#22-text)\r\n - [MatchMaker](#23-matchmaker)\r\n - [Plugins](#24-plugins-nested-in-matchmaker)\r\n - [timeLib](#25-timelib-nested-in-matchmaker)\r\n - [API](#api-documentation)\r\n - [Math](#math-operations)\r\n - [Text](#text-operations)\r\n - [MatchMaker](#matchmaker)\r\n - [Plugins](#plugins)\r\n - [Authors](#authors)\r\n - [License](#license)\r\n - [Future Plans](#future-plans)\r\n\r\n## 1. **Global Variables**\r\n- **`intrepunctions`**: A list of punctuation marks used for text analysis (e.g., \".\", \",\", \":\", \"?\", etc.).\r\n- **`whiteSigns`**: A list of whitespace characters (e.g., \" \", \"\\n\", etc.).\r\n- **`data`**: JSON data loaded from the file `matchmaker.json` that stores configuration settings.\r\n\r\n## 2. **Classes**\r\n\r\n#### **2.1. Math**\r\nThis class contains mathematical operations for analyzing numerical data.\r\n\r\n- **`Mean(analisysData: list)`**: Returns the average of a list of numbers.\r\n- **`Difference(a, b)`**: Calculates the percentage difference between two values `a` and `b`.\r\n- **`Normalize(analisysData: list, normalizeNumber: int)`**: Normalizes the values in `analisysData` to a scale defined by `normalizeNumber`.\r\n- **`MakeInt(value: float, divideNumber: int)`**: Converts a float to an integer by rounding after subtracting `divideNumber`.\r\n- **`AbsoluteDifference(a, b)`**: Returns the absolute difference between two values.\r\n- **`AbsoluteIntPercentDifference(a, b)`**: Returns the absolute percentage difference, converted to an integer.\r\n- **`WeightedAverage(analisysData: list, weights: list)`**: Computes the weighted average of the given data.\r\n- **`NumberRepeat(numbers: list)`**: Returns a dictionary with the count of occurrences of each number in `numbers`.\r\n- **`PercentNumberChance(numbers: list)`**: Returns a dictionary showing the probability (as a percentage) of each number appearing in `numbers`.\r\n\r\n#### **2.2. Text**\r\nThis class provides utilities for text analysis and manipulation.\r\n\r\n- **`CountInterpunctions(text: str)`**: Returns a dictionary with the count of each punctuation mark from `intrepunctions` in the provided `text`.\r\n- **`CountSigns(text: str, lowerSigns: bool)`**: Returns a dictionary of character counts in `text`, either case-sensitive or case-insensitive based on the `lowerSigns` flag.\r\n- **`CountWord(text: str, word: str)`**: Returns the number of times a word appears in the provided `text`.\r\n- **`FilterWordsWithSign(text: str, sign: str, filterType: FilterType)`**: Based on `filterType`, either counts or removes the occurrences of a word (`sign`) from `text`.\r\n- **`NormalizeText(text: str, normalizeType: NormalizeType)`**: Performs various normalization actions (such as deleting punctuation or changing text to lowercase) based on the specified `normalizeType`.\r\n- **`GetWordsFromText(text: str)`**: Splits the provided text into a list of words.\r\n\r\n#### **2.3. MatchMaker**\r\nThis class is responsible for more advanced text manipulation, including hidden text processing and splitting based on specific rules.\r\n\r\n- **`MMSplitText(text: str)`**: Splits the text based on a key defined in the `matchmaker.json` file and returns a list of text segments.\r\n- **`MMHiddenText(text: str)`**: Removes hidden parts of the text enclosed by specific start and end markers from `matchmaker.json`.\r\n- **`MMPasswordText(text: str)`**: Replaces the content between specific markers (start and end) with asterisks for obfuscation.\r\n\r\n#### **2.4. Plugins (Nested in MatchMaker)**\r\nThis class manages external plugins that can extend the library's functionality.\r\n\r\n- **`InstallPlugin(name: str)`**: Installs a plugin by importing it and updating the `matchmaker.json` file.\r\n\r\n#### **2.5. timeLib (Nested in MatchMaker)**\r\nThis class allows for time-based text operations if the `timeLib` plugin is installed.\r\n\r\n- **`Detect(text: str)`**: Detects and replaces time tags in the text if the `timeLib` plugin is available.\r\n\r\n## API Documentation\r\n\r\n#### **Math Operations**\r\n1. **`Mean(analisysData: list) -> float`**: Calculate the mean of a list of numbers.\r\n ```python\r\n Math.Mean([1, 2, 3, 4, 5]) # Returns: 3.0\r\n ```\r\n\r\n2. **`Difference(a: float, b: float) -> float`**: Calculate the percentage difference between `a` and `b`.\r\n ```python\r\n Math.Difference(50, 100) # Returns: 100.0\r\n ```\r\n\r\n3. **`Normalize(analisysData: list, normalizeNumber: int) -> list`**: Normalize a list of numbers to a specified range.\r\n ```python\r\n Math.Normalize([1, 2, 3], 10) # Returns: [3.33, 6.67, 10]\r\n ```\r\n\r\n4. **`AbsoluteDifference(a: float, b: float) -> float`**: Return the absolute difference between two values.\r\n ```python\r\n Math.AbsoluteDifference(5, 10) # Returns: 5\r\n ```\r\n\r\n5. **`WeightedAverage(analisysData: list, weights: list) -> float`**: Calculate the weighted average of a list.\r\n ```python\r\n Math.WeightedAverage([3, 4, 5], [1, 2, 1]) # Returns: 4.0\r\n ```\r\n\r\n6. **`NumberRepeat(numbers: list) -> dict`**: Return a dictionary with the number of times each number appears in the list.\r\n ```python\r\n Math.NumberRepeat([1, 2, 2, 3]) # Returns: {1: 1, 2: 2, 3: 1}\r\n ```\r\n\r\n#### **Text Operations**\r\n1. **`CountInterpunctions(text: str) -> dict`**: Count how many times each punctuation appears in the text.\r\n ```python\r\n Text.CountInterpunctions(\"Hello, world!\") # Returns: {\",\": 1, \"!\": 1}\r\n ```\r\n\r\n2. **`CountSigns(text: str, lowerSigns: bool) -> dict`**: Count each character's appearance in the text, either case-sensitive or case-insensitive.\r\n ```python\r\n Text.CountSigns(\"Hello\", True) # Returns: {\"h\": 1, \"e\": 1, \"l\": 2, \"o\": 1}\r\n ```\r\n\r\n3. **`CountWord(text: str, word: str) -> int`**: Count how many times a word appears in the text.\r\n ```python\r\n Text.CountWord(\"This is a test. This test is simple.\", \"test\") # Returns: 2\r\n ```\r\n\r\n4. **`NormalizeText(text: str, normalizeType: NormalizeType) -> str`**: Normalize text by performing actions such as removing punctuation or converting text to lowercase.\r\n ```python\r\n Text.NormalizeText(\"Hello, World!\", NormalizeType.LowText) # Returns: \"hello, world!\"\r\n ```\r\n\r\n#### **MatchMaker**\r\n1. **`MMSplitText(text: str) -> list`**: Split text based on a key defined in the `matchmaker.json` file.\r\n ```python\r\n MatchMaker.MMSplitText(\"Hello world!\") # Returns: list of segments based on key\r\n ```\r\n\r\n2. **`MMHiddenText(text: str) -> str`**: Remove hidden text segments enclosed by specified markers.\r\n ```python\r\n MatchMaker.MMHiddenText(\"This is {hd}secret{/hd} text.\") # Returns: \"This is text.\"\r\n ```\r\n\r\n3. **`MMPasswordText(text: str) -> str`**: Obfuscate text between markers with asterisks.\r\n ```python\r\n MatchMaker.MMPasswordText(\"Password is {password}12345|{/password} hidden.\") # Returns: \"Password is ***** hidden.\"\r\n ```\r\n\r\n#### **Plugins**\r\n1. **`InstallPlugin(name: str)`**: Install and integrate an external plugin into the library.\r\n\r\n ```python\r\n MatchMaker.Plugins.InstallPlugin(\"example_plugin\")\r\n ```\r\n## Authors\r\n#### Franciszek Chmielewski (ferko2610@gmail.com)\r\n## License\r\nAll in LICENSE file.\r\n\r\n MIT Licence\r\n\r\n Copyright (c) 2024 Franciszek Chmielewski.\r\n\r\n Permission is hereby granted to anyone who obtains a copy of this software and associated documentation files (the \u2018Software\u2019) to use the Software for personal purposes only, subject to the following conditions:\r\n\r\n 1. The Software may not be copied, reproduced, modified or distributed in any form without the prior written consent of the author.\r\n 2. It is not permitted to publish, sublicense, sell, share or transfer the Software to others without the written consent of the author.\r\n 3. It is prohibited to decompile, reverse engineer, modify or create derivative works based on the Software.\r\n\r\n <b>THE SOFTWARE IS PROVIDED \u2018AS IS\u2019 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIMS, DAMAGES OR OTHER LIABILITIES, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING OUT OF OR RELATING TO THE SOFTWARE OR THE USE OR OTHER ACTIVITIES IN THE SOFTWARE.</b>\r\n## Future Plans\r\n#### Roadmap: [Roadmap](https://trello.com/b/dJ2B3uSM/hintlydataanalisys)\r\n - Adding more mathematical tools\r\n - Adding more text tools\r\n - Adding more plug-ins to MatchMaker.\r\n - Adding functions to MatchMaker.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Library for mathematical, financial and textual analysis",
"version": "0.4.2.4",
"project_urls": null,
"split_keywords": [
"mathematics",
"analysis",
"text",
"data",
"ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "696c7b71d7ae80a092f4b3a71080426de73a29cd475c67350f5c27613be5c22b",
"md5": "a410e1b226d92297534e00d9fe73935a",
"sha256": "5dc025bb8caa015277ea90a252647b909555ed057bb346b370892c33dfee4d8b"
},
"downloads": -1,
"filename": "HintlyDataAnalisys-0.4.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a410e1b226d92297534e00d9fe73935a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 9937,
"upload_time": "2024-09-29T17:18:03",
"upload_time_iso_8601": "2024-09-29T17:18:03.930938Z",
"url": "https://files.pythonhosted.org/packages/69/6c/7b71d7ae80a092f4b3a71080426de73a29cd475c67350f5c27613be5c22b/HintlyDataAnalisys-0.4.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cb38f7e836628f4fec042dbde16e56f5be697eb074612e5207df59a5ae8fb64c",
"md5": "f864808ceaa23884cf0dbfe6aedcec97",
"sha256": "0c924cf44c9d84faf376b9d8813837a9982b5a8bdce054cdf7e459c050d87b33"
},
"downloads": -1,
"filename": "hintlydataanalisys-0.4.2.4.tar.gz",
"has_sig": false,
"md5_digest": "f864808ceaa23884cf0dbfe6aedcec97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8556,
"upload_time": "2024-09-29T17:18:04",
"upload_time_iso_8601": "2024-09-29T17:18:04.860411Z",
"url": "https://files.pythonhosted.org/packages/cb/38/f7e836628f4fec042dbde16e56f5be697eb074612e5207df59a5ae8fb64c/hintlydataanalisys-0.4.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-29 17:18:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "hintlydataanalisys"
}