there are some questions about this which I've studied, but I'm still not sure about a couple of things.
I want to split a page stream (concatenated PDFs) in to singular documents. So the trick is to find where one document ends and where the next one starts. So a PDF can have 1000 pages, and can consist out of 20 documents, each with different lengths.
That being said, one feature I want to introduce is 'page similarity' where page (p) has a similarity score for the page before it (p-1). So studying this problem leads me to a lot of examples using LDA and LSI models, but is this the way to go?
I have made a corpus with all the tokens, bigrams, trigrams from all 1000 pages. What is the best way to compare two pages with each other? I have looked had this example where an LSI model is used to compare a query with a whole corpus, but I can't figure out how to compare it with just one previous page/document. Any other ideas will be greatly appreciated!
texts = data_lemmatized # --> all tokenized + filtered + bigrams + trigrams using gensim
dictionary = corpora.Dictionary(data_lemmatized)
corpus = [dictionary.doc2bow(text) for text in data_lemmatized]
lsi = models.LsiModel(corpus, id2word=dictionary, num_topics=2)
vec_bow = dictionary.doc2bow(data_lemmatized[1]). #--> this is page 2, which I want to compare with data_lemmatized[0]
vec_lsi = lsi[vec_bow]
index = similarities.MatrixSimilarity(lsi[corpus])
sims = index[vec_lsi] # -->this performs a similarity query against the corpus, but I want only 1 page