Is there a straightforward way to classify documents at the sentence level, while using surrounding sentences for context?
## ❓ Questions & Help

I'm curious how one would go about classifying documents at the sentence level using the Sequence Classification classes where the classification of a document's sentence would use other sentences in the document for context.

For example, if a document says, "I truly hate this product. Thanks [company name]!" The two sentences should be classified as negative. However, if you classify each sentence separately, "I truly hate this product" would be classified as negative, while "Thanks [company name]!" would likely be classified as positive.

I understand I could classify the document as a whole, but I'm looking for a more granular level of text classification.

Any guidance on making adjustments for this need would be greatly appreciated.

Thanks!

Maybe you should start with [XLNet](https://arxiv.org/abs/1906.08237).<|||||>@iedmrc Thanks, I'm sure that most of these models could do this. I'm looking for guidance on adjusting the architecture of these transformer models to look for context form surrounding sentences to classify the current sentence. XLNetForSequenceClassification takes in a document as a whole for classification.

I imagine many others have confronted this problem, so I'm reaching out for guidance on where to start.<|||||>@pydn You are probably looking for a model like this: https://github.com/allenai/sequential_sentence_classification<|||||>@armancohan Thank you! This is exactly what I was looking for.