module texthelper.text_diff

Short summary

module pyquickhelper.texthelper.text_diff

Freely inspired from Showing Side-by-Side Diffs in Jupyter.

source on GitHub

Functions

function

truncated documentation

_html_sidebyside

_html_unsentencise

Joing a list of sentences into HTML for display

_mark_span

_mark_text

_markup_diff

Returns a and b with any differences processed by mark. Junk is ignored by the differ.

_sentencize

Split a string into a list of sentences

_tokenize

Split a string into tokens

_unsentencise

Join a list of sentences into a string

_untokenize

Join a list of tokens into a string

align_seqs

Aligns two sequences of strings after comparing them.

html_diffs

Comparares two strings and renders the results as HTML.

Documentation

Freely inspired from Showing Side-by-Side Diffs in Jupyter.

source on GitHub

pyquickhelper.texthelper.text_diff._html_sidebyside(a, b)[source]
pyquickhelper.texthelper.text_diff._html_unsentencise(ts)[source]

Joing a list of sentences into HTML for display

source on GitHub

pyquickhelper.texthelper.text_diff._mark_span(text)[source]
pyquickhelper.texthelper.text_diff._mark_text(text)[source]
pyquickhelper.texthelper.text_diff._markup_diff(a, b, mark=<function _mark_span>, default_mark=None, isjunk=None)[source]

Returns a and b with any differences processed by mark. Junk is ignored by the differ.

source on GitHub

pyquickhelper.texthelper.text_diff._sentencize(s)[source]

Split a string into a list of sentences

source on GitHub

pyquickhelper.texthelper.text_diff._tokenize(s)[source]

Split a string into tokens

source on GitHub

pyquickhelper.texthelper.text_diff._unsentencise(ts)[source]

Join a list of sentences into a string

source on GitHub

pyquickhelper.texthelper.text_diff._untokenize(ts)[source]

Join a list of tokens into a string

source on GitHub

pyquickhelper.texthelper.text_diff.align_seqs(a, b, fill='')[source]

Aligns two sequences of strings after comparing them.

source on GitHub

pyquickhelper.texthelper.text_diff.html_diffs(a, b)[source]

Comparares two strings and renders the results as HTML.

source on GitHub