Hi,
I’m trying to build two pdf documents comparison app. I can do it by splitting documents to the paragraphs and search (with gensim) most similar text in both documents. This part is done, but I can not find a way how to show it in a better way. My idea was to highlight paragraphs in one text and link it to the most similar ones in another. But I do not know how to do it. I can display pdf documents with html.iframe component, but I can not find a way how to search and highlight text in the displayed pdf files.
Thanks for any help.
Here is my code so far:
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(
external_stylesheets=[dbc.themes.BOOTSTRAP]
)
pdfFrame = html.Iframe(
src=f'assets/test.pdf',
style=dict(width="100%", height="80vh")
)
layout = dbc.Row([
dbc.Col([
dbc.Card(
dbc.CardBody(
pdfFrame
)
)
], width=6),
dbc.Col([
dbc.Card(
dbc.CardBody(
pdfFrame
)
)
], width=6)
], style={'padding': '5rem'})
app.layout = layout
if __name__ == '__main__':
app.run_server(debug=True, port=8049, host='127.0.0.1')```