Re: [Apertium-stuff] Automatically change first-person to third-person
Hi Kevin, your new solution with rtx would be of interest. I´ve attached your old Python script. Your answer from 2018: $ curl http://termbin.com/sah4 >pres2pret.py $ curl https://raw.githubusercontent.com/goavki/streamparser/master/streamparser.py >streamparser.py $ sudo apt install apertium-nno $ echo 'ååh hald no opp, eg gjer det etter kvart.' |\ apertium-deshtml -n |\ lt-proc /usr/share/apertium/apertium-nno/nno.automorf.bin |\ cg-proc -1 /usr/share/apertium/apertium-nno/nno.rlx.bin |\ python3 pres2pret.py|\ lt-proc -g /usr/share/apertium/apertium-nno/nno.autogen.bin |\ apertium-rehtml-noent which gives the (rather ungrammatical) answer "ååh hald no opp, eg gjorde det etter kvart". The link once again: https://sourceforge.net/p/apertium/mailman/apertium-stuff/thread/1519736195.3991384.1284992528.191E054E%40webmail.messagingengine.com/#msg36238830 Or search for "change of tense" in the list archives. The original subject was: Automatic change of tense -- Vänligen Per Tunedal On Mon, Feb 14, 2022, at 20:10, Kevin Brubeck Unhammer wrote: >> The link in that earlier email is dead, so I can't see what the original >> script was doing, but based on the name it might have just been replacing >> with , in which case, if you still have that script, you could >> just edit it to replace with . > > Wops, I should've attached it … > > These days I think I'd use rtx for this, probably would be an even > shorter file =D > > ___ > Apertium-stuff mailing list > Apertium-stuff@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/apertium-stuff > > Attachments: > * signature.asc#!/usr/bin/env python3 import sys from streamparser import parse_file, readingToString, known, SReading for blank, lu in parse_file(sys.stdin, withText=True): pres = [s for r in lu.readings for s in r if s.tags == ['vblex', 'pres']] if pres != []: pret = [SReading(baseform=s.baseform, tags=['vblex', 'pret']) for s in pres] print(blank+" ".join("^{}$".format(readingToString(pret)) for r in lu.readings), end="") else: print(blank+"["+lu.wordform+"]", end="") ___ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff
Re: [Apertium-stuff] Automatically change first-person to third-person
> The link in that earlier email is dead, so I can't see what the original > script was doing, but based on the name it might have just been replacing > with , in which case, if you still have that script, you could > just edit it to replace with . Wops, I should've attached it … These days I think I'd use rtx for this, probably would be an even shorter file =D signature.asc Description: PGP signature ___ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff
Re: [Apertium-stuff] Automatically change first-person to third-person
The link in that earlier email is dead, so I can't see what the original script was doing, but based on the name it might have just been replacing with , in which case, if you still have that script, you could just edit it to replace with . Daniel On Mon, Feb 14, 2022 at 6:20 AM Per Tunedal wrote: > HI again, > OOps, I happened to take the wrong book from the book shelf. I should have > taken one of those a bit more to the left :-( > The examples are from the works of an other author, Sun Axelsson, not > Majgull Axelsson. > But the question is still valid. And you could still make Majgull happy on > her anniversary. > Yours, > Per Tunedal > > -- > Vänligen > Per Tunedal > > On Mon, Feb 14, 2022, at 11:11, Per Tunedal wrote: > > Hi, > > Today is the anniversary of the Swedish author Majgull Axelsson. I've > > just read an interview with her in my morning paper, Dagens Nyheter. > > She tells about the work with a new novel. She has just decided to > > change the narrator perspective from first-person to third-person > > (singular) and wish some help: > > "Jag önskar mig innerligt i fördelsedagspresent, ett datorprogram som > > kan ändra tempus och berättarperspektiv väldigt enkelt, skämtar hon." > > > > My translation: > > "I fervently wish me a computer program that is able to change the > > tense and the narrative perspective very easy, she says with a laugh." > > > > I've in the past already asked for changing the tense, so this is > > doable. > > > https://sourceforge.net/p/apertium/mailman/apertium-stuff/thread/1519736195.3991384.1284992528.191E054E%40webmail.messagingengine.com/#msg36238830 > > > > She would like to change the perpecive as well, something like: > > > > Example 1: > > "Jag länktade hem och lyfte glaset med en sliskig mintlikör till > > munnen. Jag svalde klunk efter klunk och tog klumparna jag svalde för > > sockeravlagringar. Tills jag såg att det var flugor." > > (Her book "Honungsvargar", page 19) > > > > To: > > Hon länktade hem och lyfte glaset med en sliskig mintlikör till munnen. > > Hon svalde klunk efter klunk och tog klumparna hon svalde för > > sockeravlagringar. Tills hon såg att det var flugor. ... " (Narrator > > changed from 1:st person to third person) > > > > or: > > > > Hon länktar hem och lyfter glaset med en sliskig mintlikör till munnen. > > Hon sväljer klunk efter klunk och tar klumparna hon sväljer för > > sockeravlagringar. Tills hon ser att det är flugor. ... " (Narrator > > changed from 1:st person to third person and past tens to present tense) > > > > > > Example 2: > > "Mig, skrev han, hade han aldrig älskat." > > ("Honungsvargar", page 23) > > > > To: > > "Henne, skrev han, hade han aldrig älskat." (Narrator changed from 1:st > > person to third person) > > > > Maybe the Apertium community could make her wish true? > > > > Yours, > > Per Tunedal > > > > BTW A more fundamental change of narrative perspective would be harder. > > Like changing narrator from the woman to the man in this text. I don't > > think it's possible. > > > > The first example would become something like: > > "Han såg henne lyfta glaset med den sliskiga minlikören till munnen. > > Hon svalde klunk efter klunk. Plötsligt stelnade hon till och stirrade > > ned i glaset. 'Flugor', skrek hon." > > > > > > ___ > > Apertium-stuff mailing list > > Apertium-stuff@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/apertium-stuff > > > ___ > Apertium-stuff mailing list > Apertium-stuff@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/apertium-stuff > ___ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff
Re: [Apertium-stuff] Automatically change first-person to third-person
HI again, OOps, I happened to take the wrong book from the book shelf. I should have taken one of those a bit more to the left :-( The examples are from the works of an other author, Sun Axelsson, not Majgull Axelsson. But the question is still valid. And you could still make Majgull happy on her anniversary. Yours, Per Tunedal -- Vänligen Per Tunedal On Mon, Feb 14, 2022, at 11:11, Per Tunedal wrote: > Hi, > Today is the anniversary of the Swedish author Majgull Axelsson. I've > just read an interview with her in my morning paper, Dagens Nyheter. > She tells about the work with a new novel. She has just decided to > change the narrator perspective from first-person to third-person > (singular) and wish some help: > "Jag önskar mig innerligt i fördelsedagspresent, ett datorprogram som > kan ändra tempus och berättarperspektiv väldigt enkelt, skämtar hon." > > My translation: > "I fervently wish me a computer program that is able to change the > tense and the narrative perspective very easy, she says with a laugh." > > I've in the past already asked for changing the tense, so this is > doable. > https://sourceforge.net/p/apertium/mailman/apertium-stuff/thread/1519736195.3991384.1284992528.191E054E%40webmail.messagingengine.com/#msg36238830 > > She would like to change the perpecive as well, something like: > > Example 1: > "Jag länktade hem och lyfte glaset med en sliskig mintlikör till > munnen. Jag svalde klunk efter klunk och tog klumparna jag svalde för > sockeravlagringar. Tills jag såg att det var flugor." > (Her book "Honungsvargar", page 19) > > To: > Hon länktade hem och lyfte glaset med en sliskig mintlikör till munnen. > Hon svalde klunk efter klunk och tog klumparna hon svalde för > sockeravlagringar. Tills hon såg att det var flugor. ... " (Narrator > changed from 1:st person to third person) > > or: > > Hon länktar hem och lyfter glaset med en sliskig mintlikör till munnen. > Hon sväljer klunk efter klunk och tar klumparna hon sväljer för > sockeravlagringar. Tills hon ser att det är flugor. ... " (Narrator > changed from 1:st person to third person and past tens to present tense) > > > Example 2: > "Mig, skrev han, hade han aldrig älskat." > ("Honungsvargar", page 23) > > To: > "Henne, skrev han, hade han aldrig älskat." (Narrator changed from 1:st > person to third person) > > Maybe the Apertium community could make her wish true? > > Yours, > Per Tunedal > > BTW A more fundamental change of narrative perspective would be harder. > Like changing narrator from the woman to the man in this text. I don't > think it's possible. > > The first example would become something like: > "Han såg henne lyfta glaset med den sliskiga minlikören till munnen. > Hon svalde klunk efter klunk. Plötsligt stelnade hon till och stirrade > ned i glaset. 'Flugor', skrek hon." > > > ___ > Apertium-stuff mailing list > Apertium-stuff@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/apertium-stuff ___ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff
[Apertium-stuff] Automatically change first-person to third-person
Hi, Today is the anniversary of the Swedish author Majgull Axelsson. I've just read an interview with her in my morning paper, Dagens Nyheter. She tells about the work with a new novel. She has just decided to change the narrator perspective from first-person to third-person (singular) and wish some help: "Jag önskar mig innerligt i fördelsedagspresent, ett datorprogram som kan ändra tempus och berättarperspektiv väldigt enkelt, skämtar hon." My translation: "I fervently wish me a computer program that is able to change the tense and the narrative perspective very easy, she says with a laugh." I've in the past already asked for changing the tense, so this is doable. https://sourceforge.net/p/apertium/mailman/apertium-stuff/thread/1519736195.3991384.1284992528.191E054E%40webmail.messagingengine.com/#msg36238830 She would like to change the perpecive as well, something like: Example 1: "Jag länktade hem och lyfte glaset med en sliskig mintlikör till munnen. Jag svalde klunk efter klunk och tog klumparna jag svalde för sockeravlagringar. Tills jag såg att det var flugor." (Her book "Honungsvargar", page 19) To: Hon länktade hem och lyfte glaset med en sliskig mintlikör till munnen. Hon svalde klunk efter klunk och tog klumparna hon svalde för sockeravlagringar. Tills hon såg att det var flugor. ... " (Narrator changed from 1:st person to third person) or: Hon länktar hem och lyfter glaset med en sliskig mintlikör till munnen. Hon sväljer klunk efter klunk och tar klumparna hon sväljer för sockeravlagringar. Tills hon ser att det är flugor. ... " (Narrator changed from 1:st person to third person and past tens to present tense) Example 2: "Mig, skrev han, hade han aldrig älskat." ("Honungsvargar", page 23) To: "Henne, skrev han, hade han aldrig älskat." (Narrator changed from 1:st person to third person) Maybe the Apertium community could make her wish true? Yours, Per Tunedal BTW A more fundamental change of narrative perspective would be harder. Like changing narrator from the woman to the man in this text. I don't think it's possible. The first example would become something like: "Han såg henne lyfta glaset med den sliskiga minlikören till munnen. Hon svalde klunk efter klunk. Plötsligt stelnade hon till och stirrade ned i glaset. 'Flugor', skrek hon." ___ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff