I'd would argue the question is rather "CAN we teach literature ...".

tl;dr -> you can't in european, post-modernism-influenced universities, because it's a math-less culture.

Not so long ago I was still a linguistics student, trying to specialize in NLP. Eventually I dropped. I dropped when I was asked to apply a multivariate model used to classify english texts in genres, to a corpus of texts written in french. Mind you, i wasn't asked to follow a specific methodology and re-do what had been done for english texts. No. I was asked to directly "translate" english-specific linguistic features, and then use the associated weights of the original model. I guess this would be the equivalent of trying to, say, classifying pictures of cats using a model to classify pictures of cars, by somehow translating cat pictures to car pictures beforehand.
I have a few more examples of this kind, but really there was little to no mathematical culture in my uni linguistics dpt, where it can take 2 mins for a NLP researcher to figure out 95% of 10000 = 9500. So I dropped.

I dropped yeah, but why did I even got into this cursus in the first place ? Because, we, continental people, don't believe everything can be reduced to a universal formalism. Especially in fields such as semiotics. There is always deeper truths to whatever absolute formalism you bring on the table. A text is an alchemy and, to us, it is unconceivable that some kind of periodic table of semiotic-elements is ever to be discovered. Meaning has no pre-defined ontology waiting for us to discover it. Adios Mendeleïev.

What does it lead to ? It leads to intellectual confrontation. Confrontation against the american devil. We gave you a name : formalist-positivist. You're in the wrong. We shall impale you eventually and thus we spit on your dictatorial formalisms (even shannon's information theory, shhh...), even though leaders as important as Saussure or Levy-Strauss called for a mathematization of the field.

So why did I embark on this boat ? Because there was a promise. The promise to study language in itself and by itself. You start by reading Saussure Cours de linguistique generale, then you're asked to shed lights on his definitions of langue and parole. It's hard. It's very hard because a) it's not formal b) you're subject to the arbitrary judgement of whoever rates your work just like in ... philosophy. So you dig, deeper and deeper, and at some point you figure out : a) Saussure never wrote the aforementioned book (his disciples did, just like ... Jesus) b) and he wrote in one of his last letter that he did not believe there was any concept in linguistics grounded on solid basis. But they don't really care. It's in the goddamn book. It's worth teaching, heh. And that makes you want to quit. You might ask : "So it's like philosophy ? There is no real foundation, it's just a field culture ?". I don't know. What I know for sure is that I've NEVER had any philosophy courses (this includes philosophy of language).

Hopefully there are some cognitive linguistics. With numbers and stats, with stddevs and error margins. What are these things ? What's the role of these meta-numbers in understanding the phenomenon being observed ? You ask about it. You're replied it's not in the course. You insist because, well the devil is in the details, and these numbers seem pretty important. Alas, it's too complicated for a freshman. Finally, you're expected to do a mongoloidly difficult exercise : to constitue a word-list for a priming experiment. You work your ass off, taking inspiration from the little physics you know (because THAT is real science) and deliver a 60 pages-long paper only to see other students just dumped a one-page explanation. The professors frowns at your work. Something must be wrong with you.

So, that's basically the state of linguistics in my country (France). It's not really philosophy, it's not real science, it lies between heaven and underground caves : right in a pool of mud.

My conclusion is that you can't teach algorithmic methods to literature students here, because almost nobody in the field can. We want the irreducibility of alchemy but still think we can reach this goal while still getting away with Maths. Are we hoping we'll find a way to whisper magic words at the cauldron and get results out of the process ? Probably.

It's really a shame, because there are plenty of good theories, unfortunately, very few have the skills to implement them, and they are very badly marketed (publishing in french for instance ...). And the post-modern flavor the whole field has, is not even something bad. I recently read Deleuze' "What is philosphy" and it's just amazing - of course, it's not crystal clear, but if you can read between the lines, you start making connection with recent advancements : vector space model, compositional distributional model of meaning (Oxford quantum-categoretic grammars), dynamical models of cognition (Polythechnique, Petitot), Fractal Patterns in Reasonning (Groningen, Atkinson). All of them using advanced maths. Can I understand the details ? Absolutely not. Does my guts tell me these guys have put their hands on something promising ? Absolutely yes.
But I suck at math, I suck, so I dropped to avoid sucking at math even more.

Anyway it doesn't matter. I'm looking for a crappy 9-5 job, now, cobbling together web-forms or something.