Stylometry
Find who most likely wrote a text, among authors you give samples of, from the habits nobody chooses: their rates of little words, letter sequences and punctuation
Texts each of them wrote, of the same kind as the one to attribute (letters with letters, novels with novels): several thousand words each.
Times per 1,000 words. The habits the text and the closest candidate both have far more, or far less, than the candidates on average; then the frequent words where they differ most.
Everyone uses the little words (the, of, upon, de, que…) at their own rate, without choosing to, whatever they write about. The tool compares the text's rates with each candidate's: Burrows' Delta, in its cosine form, on the 100 most frequent words all of them use and on the 200 most frequent sequences of three characters. The method pointed to J. K. Rowling behind Robert Galbraith in 2013. Nothing leaves your device.
It names the closest candidate, never “none of them”: if the author isn't among them, one is still named. The genre weighs as much as the author (a letter isn't written like a novel), and a short text says little: under 1,000 words the result is a hint, from 2,500 words up it gets reliable. To show what it's worth on your candidates, each passage of the candidates' samples is set aside in turn and attributed by the same method.
Turned the other way, it shows what in your own writing gives you away: attribute one of your texts, with your other texts as a candidate among others', and read the habits it shares with yours.