Skip to content

Commit

Permalink
Update docs\source\
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeqfu committed Jun 17, 2023
1 parent e5d8336 commit dcc74fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 4 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def __init__(self, **options):
\clearpage
\pagenumbering{arabic}
''' % (project,
''' % (__project__,
__description__.rstrip('.'),
release,
__author__,
Expand All @@ -269,6 +269,8 @@ def __init__(self, **options):
\linespread{1.05}
\renewcommand{\sfdefault}{pplj}
\newunicodechar{≤}{\ensuremath{\leq}}
\newunicodechar{≈}{\ensuremath{\approx}}
\newunicodechar{≥}{\ensuremath{\geq}}
\IfFileExists{zlmtt.sty}
{\usepackage[light,scaled=1.05]{zlmtt}}
{\renewcommand{\ttdefault}{lmtt}}
Expand All @@ -294,7 +296,7 @@ def __init__(self, **options):

'preamble': latex_preamble,

'figure_align': 'H', # 'htbp',
'figure_align': 'H', # Latex figure (float) alignment; optional: 'htbp'
'extraclassoptions': 'openany,oneside',

'maketitle': latex_maketitle,
Expand Down
11 changes: 5 additions & 6 deletions docs/source/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -531,22 +531,21 @@ The module :mod:`pyhelpers.text` can assist us in manipulating textual data. For
>>> result_1
'Anglia'
By default, the function relies on `difflib`_ - a Python built-in module - to perform the task. Alternatively, we could also make use of an open-source package, `FuzzyWuzzy`_, via setting the parameter ``engine='fuzzywuzzy'``:
By default, the function relies on `difflib`_ - a Python built-in module - to perform the task. Alternatively, we could also make use of an open-source package, `RapidFuzz`_, via setting the parameter ``engine='rapidfuzz'`` (or simply ``engine='fuzz'``):

.. _`FuzzyWuzzy`: https://pypi.org/project/fuzzywuzzy/
.. _`difflib`: https://docs.python.org/3/library/difflib.html
.. _`RapidFuzz`: https://pypi.org/project/rapidfuzz/

.. code-block:: python
>>> # Find the most similar word to 'angle' by using FuzzyWuzzy
>>> result_2 = find_similar_str(word, lookup_list, engine='fuzzywuzzy')
>>> # Find the most similar word to 'angle' by using RapidFuzz
>>> result_2 = find_similar_str(word, lookup_list, engine='rapidfuzz')
>>> result_2
'Anglia'
.. note::

- The package `FuzzyWuzzy`_ is NOT an essential dependency for the installation of pyhelpers>=1.3.0. We need to install it (e.g. via ``pip install``) to make the function run successfully with setting ``engine='fuzzywuzzy'``.
- In previous versions of pyhelpers (i.e. pyhelpers<=1.2.14), optional values for the parameter ``engine`` include ``'fuzzywuzzy'`` and ``'nltk'``. The latter has been replaced with ``'difflib'`` since pyhelpers 1.2.15.
- The package `RapidFuzz`_ is NOT an essential dependency for the installation of pyhelpers. We need to install it (e.g. via ``pip install``) to make the function run successfully with setting ``engine='rapidfuzz'`` (or ``engine='fuzz'``).



Expand Down

0 comments on commit dcc74fb

Please sign in to comment.