1
$\begingroup$

I know using Conditional Language Model I can learn the probability of a sentence given the corpus I used to train my model. I will then be able to generate meaningful text by sampling from the distribution of sentences.

Now what I want to do is to compare the text generated from the language model of two different corpora on the same topic.

Use case: I want to compare the headline that a right winning vs left winning news outlet would use for a given news content. (my training data would be a large set of headline+news content from both news outlet)

$\endgroup$

1 Answer 1

1
$\begingroup$

If I understand your question correctly (please comment if I don't), you want to compare the output text from two different language models. Therefore, I don't think you should worry too much about the language models themselves.

If I was you, I'd probably do a simple TFIDF analysis so that you can gain a better understanding of what terms are more prevalent in certain news outlets.

Take a look at scattertext, it allows you to create visualizations like the following:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you this is great. And I presumably can do something with structural topic modeling and use the ideology as the covariate too. However, I wanted to do something more sophisticated in terms of learning the style and interaction/squence of words across two media outlet. That is, both new outlet may use similar words in their headlines about a topic yet with difference in style. $\endgroup$
    – saghi
    Commented May 1, 2020 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.