<p>Although BERT wasn't specifically trained to find similarity between JSON data, you could always extract and concatenate the values of your JSON into a long sentence and leave it to BERT to capture the context as you expect.</p>
<p>Alternatively, you could generate a cosine similarity score for each key-value dependency between the JSONs and aggregate them to generate a net similarity score for the JSON data pair.</p>
<p>Also, see <a href="https://arxiv.org/abs/1908.10084" rel="nofollow noreferrer">Sentence-BERT (SBERT)</a>, a modification of the pre-trained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity.</p>
Is it possible to use JSON format input for BERT model?
<p>I am trying to create one knowledge base (single source of truth) gathered from multiple web sources. (ex. wiki &lt;-&gt; fandom)</p>
<p>So I want to try a Siamese network or calculate cosine similarity with BERT embedded documents.</p>
<p>Then, can I ignore those json structures and train them anyway?</p>