Initial Checkin
This commit is contained in:
commit
dbc79921e4
408
README.md
Normal file
408
README.md
Normal file
|
@ -0,0 +1,408 @@
|
|||
# Localization Study: Normality
|
||||
|
||||
Normality is a first-person 3D point-and-click adventure game released in 1996 and developed by British studio Gremlin Interactive. Self-published within the UK, the original version of the game had all parts performed by [three voice actors](https://youtu.be/5Asi8L_5I-o?si=FloVWRum0toa6SoG&t=71): [Tom Hill](https://www.imdb.com/name/nm0384732/), [Lorelei King](https://www.imdb.com/name/nm0455009/) (misspelled in the credits as "Lorrelli"), and [Rob Rackstraw](https://www.imdb.com/name/nm1050409/).
|
||||
|
||||
It was published in North America by Interplay. In an unusual decision, for the US release, a complete recasting and re-recording of all in-game dialogue was undertaken, with a much larger cast of 16 credited voice actors. Most notably, former teen hearthrob [Corey Feldman](https://www.imdb.com/name/nm0000397/) was recast in the role of the player-character, Kent Knutson. I have long admired his over-the-top surfer-stoner vocal performance in this game; each one of his line reading is, quite frankly, a work of art.
|
||||
|
||||
The version that is generally available for purchase online, on [GOG](https://www.gog.com/en/game/normality) and [Steam](https://store.steampowered.com/app/400370/Normality/), is the original UK release only. Presumably the rights to the US version are more complicated and expensive to handle, and I doubt that the folks at Gremlin were thrilled at having the Britishness forcibly removed from their game anyway (a position I can respect even if Corey Feldman's performance is objectively flawless). So the North American release is harder to come by.
|
||||
|
||||
I've known most of this for a long time. What I was not aware of, until recently, was that in addition to the voices being redone, the script was also modified for its American audience. This was brought to my attention by a GOG forum thread with [detailed instructions for patching the game to use the US voices](https://www.gog.com/forum/general/voices_selector_for_the_game_normality). GOG user "KeyperOS" mentions that a subtitle file should also be included in the patch, providing instructions for how to fix it. He provides the following instructions for quickly testing to ensure that the proper subtitle file is in place:
|
||||
|
||||
> ...right after starting the game to go to the kitchen on your right, "use" the kettle once to boil the water and then "use" it again to pour the water in the coffee mug.
|
||||
>
|
||||
> If it says "Easy does it..." then it is the UK LANG file.
|
||||
> If it says "Whoah! Singe City" then it is the US LANG file.
|
||||
|
||||
As soon as I read this, I had to know more.
|
||||
|
||||
## The Files
|
||||
|
||||
`lang.dat.uk` and `lang.dat.us` are the original subtitle files for the UK and US releases, respectively. These are copyright Gremlin Interactive and included here for research purposes. They are encoded in a fairly simple format - a sequence of about 6000 4-byte little-endian integers, which correspond to offsets of strings within the file, followed by a series of null-terminated ASCII strings which are pointed at by the index. Sometimes those offsets are 0; this corresponds to a missing string at that index.
|
||||
|
||||
`diffscript.py` is a simple Python script that examines the `lang.dat` files and produces two text files: `all-subtitles-uk-us.txt` and `diff-subtitles-uk-us.txt`.
|
||||
|
||||
`all-subtitles-uk-us.txt` contains a full human-readable dump of the two subtitle files, with strings at the same index place next to one another. `diff-subtitles-uk-us.txt` contains only the strings that are different between the two files, sorted by a "difference score" - the biggest changes are at the beginning of the file.
|
||||
|
||||
## Preliminary Findings
|
||||
|
||||
The writer in both releases is credited as [Ade Carless](https://www.mobygames.com/person/5209/adrian-carless/). However, the US release has an additional credit for "Additional Script Writing", attributed to [Dennis M. Miller](https://www.mobygames.com/person/183890/dennis-m-miller/), who is also credited as the US producer. This suggests to me that he is the person primarily responsible for the changes to the US script. If anyone wanted to interview someone to get the full scoop, he would be the guy.
|
||||
|
||||
Scrolling through `diff-subtitles-uk-us.txt`, some themes emerge:
|
||||
|
||||
### Less British
|
||||
|
||||
```
|
||||
[2771] (diff score: 15)
|
||||
UK: Fruit Croppers
|
||||
US: Fruit Hedgers
|
||||
|
||||
[710] (diff score: 13)
|
||||
UK: Tarpaulin
|
||||
US: Tent
|
||||
|
||||
[3357] (diff score: 14)
|
||||
UK: I don't fancy getting in there!
|
||||
US: I don't think I'll be getting in there!
|
||||
|
||||
[2905] (diff score: 15)
|
||||
UK: Look, Kenty babe! You either borrow summat or you don't. You can't 'sorta'. And yes, yes, you can 'sorta' borrow it. Just 'sorta' bring it back when you're done, all right?
|
||||
US: Look, Kenty babe! You either borrow something or you don't. You can't 'sorta'. And yes, yes, you can 'sorta' borrow it. Just 'sorta' bring it back when you're done, all right?
|
||||
|
||||
[2627] (diff score: 12)
|
||||
UK: Ha ha! You do stuff like that and it'll stunt yer growth! Uncle Jed was only 32cm tall at the age of thirty!
|
||||
US: Ha ha! You do stuff like that and it'll stunt yer growth! Uncle Jed was only 17 inches tall at the age of thirty!
|
||||
|
||||
[233] (diff score: 28)
|
||||
UK: RAARG! YURG! ROAR!..... WOW! What was that stuff? That is potent blackcurrant juice!
|
||||
US: RAARG! YURG! ROAR!..... Whoa!!! What was that stuff? It was Potent!
|
||||
|
||||
[3297] (diff score: 12)
|
||||
UK: I have no use for rubbish. There's enough of it in my apartment!
|
||||
US: I have no use for trash. There's enough of it in my apartment!
|
||||
|
||||
[1404] (diff score: 7)
|
||||
UK: Perhaps I could put a stupid message on it, like "Kent wuz ere"?
|
||||
US: Perhaps I could put a stupid message on it like, "Kent wuz here."
|
||||
|
||||
[4968] (diff score: 7)
|
||||
UK: Bring three Mood Transmitters into this chamber. Get them now lad.
|
||||
US: Bring three Mood Transmitters into this chamber. Get them now dude.
|
||||
|
||||
[4969] (diff score: 7)
|
||||
UK: Two more now. Brave Lad!
|
||||
US: Two more now. Brave dude! Brave dude!
|
||||
|
||||
[2813] (diff score: 108)
|
||||
UK: Sheesh!! A triple CD compilation of train noises! English import, from the land of shopkeepers and eccentric Lords.
|
||||
US: This Blows!! A triple CD compilation of train noises! Who in their right mind would buy this?? ...only an engineer.
|
||||
```
|
||||
|
||||
### More Attitude
|
||||
|
||||
```
|
||||
[1762] (diff score: 31)
|
||||
UK: I'd rather have a kick in the teeth!
|
||||
US: Yeah?! I'd rather have my butt kicked!
|
||||
|
||||
[3361] (diff score: 14)
|
||||
UK: Can't we go and do something more exciting?
|
||||
US: Can't we like go and do something more exciting dude, or what?
|
||||
|
||||
[1790] (diff score: 15)
|
||||
UK: The shop's open now.
|
||||
US: The shop's open now. Yeah, right on! Cool!
|
||||
|
||||
[5533] (diff score: 15)
|
||||
UK: This stuff is totally smashed.
|
||||
US: This stuff is smashed to the Max.
|
||||
|
||||
[3996] (diff score: 13)
|
||||
UK: Are you determined to give me a hernia?
|
||||
US: Yo dude, what's up? Are you determined to give me a hernia?
|
||||
|
||||
[1333] (diff score: 12)
|
||||
UK: I can just manage to lift it. Aha, there's a blue box under here!
|
||||
US: I can just manage to lift it. Aha, there's a blue box under here! Yeah! Scoreage!
|
||||
|
||||
[2502] (diff score: 12)
|
||||
UK: Ah, the after-effects of a cooking accident. It ruined my white shirt too.
|
||||
US: Ah, the after-effects of a cooking accident. It ruined my white shirt too. Totally bogus.
|
||||
|
||||
[1341] (diff score: 100)
|
||||
UK: I wonder where these doors lead? To a secret smuggler's hideout, I bet!
|
||||
US: I wonder where these doors lead? To a secret smuggler's hideout, I bet! Or I know, a gang of terrorists! A bunch of people with guns and machines and they want to kill everyone they see and slit their throats and blood and guts!!!
|
||||
|
||||
[202] (diff score: 130)
|
||||
UK: Hey, it's Barbara Barbie! I remember watching her on 'Minor-Celebrity Triangles'!
|
||||
US: Hey, it's Barbara Barbie! What a hot chick. She was always a guest on that stupid show "Love Cruise." That was one of those Miss Spelling productions.
|
||||
|
||||
[5366] (diff score: 70)
|
||||
UK: It's an intangible lattice of light, man! How can I pick it up?
|
||||
US: Catch a clue, dude! It's a ray of light! How could I pick a ray of light up? It's just not possible.... Get a brain!
|
||||
|
||||
[3638] (diff score: 10)
|
||||
UK: It seems to be a picture of a human skull.
|
||||
US: Whoa, gnarly. It seems to be a picture of a human skull.
|
||||
```
|
||||
|
||||
### Confused About Which Direction To Turn The British/American Dial
|
||||
|
||||
```
|
||||
[2392] (diff score: 29)
|
||||
UK: Gnarly drums! I wonder where the rest of them are?
|
||||
US: Cool kit! I wonder where the rest of it is?
|
||||
|
||||
[206] (diff score: 15)
|
||||
UK: He looks like one of those presenters that look great on TV but are deeply boring and self-centred off-camera.
|
||||
US: He looks like one of those presenters that look great on TV but are deeply boring and self-centered off-camera.
|
||||
|
||||
[1524] (diff score: 68)
|
||||
UK: Why does someone want to watch some dumpsters. What a bunch of garbage! Ha ha, get it?!
|
||||
US: Why would somebody wanna watch some dumpsters? Utter rubbish...get it?
|
||||
|
||||
[5391] (diff score: 13)
|
||||
UK: Totally Trashed Guitar
|
||||
US: Pretty Trashed Guitar
|
||||
|
||||
[5598] (diff score: 7)
|
||||
UK: Yeah, I rescued the real you, but you're as mad as a marble.
|
||||
US: Yes, I rescued the real you, but you're as mad as a marble.
|
||||
```
|
||||
|
||||
### Not Incorrect Enough
|
||||
|
||||
```
|
||||
[2653] (diff score: 12)
|
||||
UK: Is it a mean streak a mile wide?
|
||||
US: Is it a mean strike a mile wide?
|
||||
|
||||
[6460] (diff score: 6)
|
||||
UK: This is where that bed is getting its juice from.
|
||||
US: This is where that bed is getting it's juice from.
|
||||
|
||||
[1379] (diff score: 7)
|
||||
UK: Mother told me not to play with electricity!
|
||||
US: A mother always told me not to play with electricity!
|
||||
|
||||
[4039] (diff score: 1)
|
||||
UK: There's still one cog missing.
|
||||
US: There' still one cog missing.
|
||||
|
||||
[1558]
|
||||
UK: They're too tough to break into.
|
||||
US: There too tough to break into.
|
||||
```
|
||||
|
||||
### Brevity Is The Soul Of Wit
|
||||
|
||||
```
|
||||
[1319] (diff score: 31)
|
||||
UK: Uh-huh. Leave The King alone.
|
||||
US: Uh-Uh. Leave The King be. Long Live the King! Hail, Rock-n-Roll!
|
||||
|
||||
[5374] (diff score: 32)
|
||||
UK: All of these hallucinations seem to be heading toward the same thing, behind that wall.
|
||||
US: All of these hallucinations seem to be heading toward the same thing, behind that wall. I wonder if there's a Pink Floyd concert there?!
|
||||
|
||||
[6175] (diff score: 32)
|
||||
UK: I could get up to some serious mischief with this hammer.
|
||||
US: Yeah! I could get up to into some serious trouble with this hammer. Can't Touch This!
|
||||
|
||||
[1268] (diff score: 31)
|
||||
UK: It extracts smells from my bathroom.
|
||||
US: It extracts smells from my bathroom, and believe me...it ain't nearly big enough!
|
||||
|
||||
[5923] (diff score: 15)
|
||||
UK: Anything else? You want me to take a few pictures? Show a few kids around?
|
||||
US: Anything else? You want me to take a few pictures? Show a few kids around? Maybe take a Norm to dinner?
|
||||
|
||||
[6329] (diff score: 15)
|
||||
UK: How do I get onto the stage?
|
||||
US: How do I get onto the stage? Whoa, big question.
|
||||
|
||||
[2407] (diff score: 14)
|
||||
UK: This is more my scene. I expect this is a satellite transmitter, or maybe a secret death ray!
|
||||
US: This is more my scene. I expect this is a satellite transmitter, or maybe a secret death ray! Beam me up, Scotty!
|
||||
|
||||
[6178] (diff score: 13)
|
||||
UK: An empty test tube!
|
||||
US: An empty test tube! A Womb with a View!
|
||||
|
||||
[3014] (diff score: 29)
|
||||
UK: He can be a diversion. I just need to get him to bark.
|
||||
US: He can be a diversion. I just need to get him to bark. Bark! Ruff...Ruff...that's what you're supposed to say...Ruff!
|
||||
```
|
||||
|
||||
### Other People's Jokes Are Also The Soul Of Wit
|
||||
|
||||
```
|
||||
[4271] (diff score: 15)
|
||||
UK: Excuse me?
|
||||
US: Ex-squeeze me?
|
||||
```
|
||||
|
||||
### Removing Jokes Is The Soul Of Wit
|
||||
|
||||
```
|
||||
[6172] (diff score: 47)
|
||||
UK: Someone let a dog do doo-doo, dude.
|
||||
US: Oh, Grodey! Somebody let their dog take a big a'poo-poo.
|
||||
|
||||
[2400]
|
||||
UK: I'm too shy to date skeletons!
|
||||
US: Yeah, right?! Like I could use a bunch of bones?!
|
||||
```
|
||||
|
||||
### Just Needs More Words
|
||||
|
||||
```
|
||||
[4485] (diff score: 15)
|
||||
UK: Hey, hey! That's done it! The sucker's busted!
|
||||
US: Hey! HEY! That's done it! The sucker's busted! Whooo hoo, Heee, hee!!
|
||||
|
||||
[3777] (diff score: 15)
|
||||
UK: That capsule thing has disappeared.
|
||||
US: Whoa, check it. That capsule thing has like, disappeared.
|
||||
|
||||
[2992] (diff score: 31)
|
||||
UK: A huge bin of toy gliders.
|
||||
US: Oh, cool! My favorite thing in the world! A huge bin of toy gliders.
|
||||
|
||||
[4387]
|
||||
UK: Not right now, but leave it with me and I'll try to work out what it does. I have my suspicions already.
|
||||
US: Not right now, but leave it with me and I'll try to work out what it does. I already have my suspicions already.
|
||||
|
||||
[1514] (diff score: 15)
|
||||
UK: Oh yes, I eat lard every day!
|
||||
US: Oh yeah, I love to eat my lard every day.
|
||||
|
||||
[4165] (diff score: 15)
|
||||
UK: Glass is dangerous, kids!
|
||||
US: Hey, just remember, glass is dangerous, kids!
|
||||
|
||||
[2552] (diff score: 45)
|
||||
UK: That's the door of my neanderthal neighbour. I'd better not disturb him!
|
||||
US: That's the door of my Neanderthal neighbor. I'd better not disturb him because he's quite neanderthalish!
|
||||
|
||||
[1109] (diff score: 7)
|
||||
UK: A key. Hmmm.... this could be the key to the whole problem!
|
||||
US: A key. Hmmm.... this could be the key to the whole problem! Get it? Ha, ha, ha.
|
||||
|
||||
[2615] (diff score: 7)
|
||||
UK: Indeed!
|
||||
US: Indeed they are, indeed.
|
||||
```
|
||||
|
||||
### What If The Line Was Totally Different Instead
|
||||
|
||||
```
|
||||
[1329] (diff score: 102)
|
||||
UK: Why does every fridge have to have the obligatory shrivelled lettuce? Why are there so many cliches in this game? Why am I even asking?
|
||||
US: I think it's lettuce and the key word there is THINK!
|
||||
|
||||
[107] (diff score: 200)
|
||||
UK: I suppose this must be the creature's eye. I think the sculpture must be a metaphor for jealousy or something. A green eye? Hmmmm... Well if this thing is interactive, you just press the eye to watch the display. Here goes...
|
||||
US: Hmmm, what an interesting sculpture. Let's see, if I remember my art classes and I -don't... my guess is the creature's green eye represents jealousy towards a materialistic world. Let's see if it's interactive. I'll just poke it in the eye and check it out.
|
||||
|
||||
[1366] (diff score: 99)
|
||||
UK: This is either a magical potion that will give me endless wishes, or it's humble fruit juice!
|
||||
US: What am I... a rocket scientist? I have no idea what this is!
|
||||
|
||||
[4422] (diff score: 95)
|
||||
UK: Could I just...
|
||||
US: What is this? What do you mean just me?? Aren't you guys gonna help? I'm no one-man army. Plus, I'm a wanted man already. I'm too young to be tortured!
|
||||
|
||||
[4393] (diff score: 69)
|
||||
UK: It's too heavy to move!
|
||||
US: Hey, I'm Kent. Not Clark Kent though... I know it's easy to confuse me with my dynamic body.
|
||||
|
||||
[5750] (diff score: 59)
|
||||
UK: I'm on it, Saul.
|
||||
US: Whoa, check it! That's a gnarly radical heart pounding noise. I'm all over it.
|
||||
|
||||
[1318] (diff score: 62)
|
||||
UK: Hey, respect the dead!
|
||||
US: Hey, it's the King man! I dig that! I believe in him. I believe he's alive. I believe in those sightings!
|
||||
```
|
||||
|
||||
### Kent-o-rama
|
||||
|
||||
```
|
||||
[3606] (diff score: 24)
|
||||
UK: Don't look down!
|
||||
US: Vertigo-o-rama!
|
||||
|
||||
[5953] (diff score: 13)
|
||||
UK: Yawn - reminds me of school.
|
||||
US: Bore-o-rama! Reminds me of school.
|
||||
|
||||
[2987] (diff score: 95)
|
||||
UK: A cool glider. I lost my pet terrapin on one of these things when I was a kid. Stupid animal didn't steer, even after I told him three times!
|
||||
US: A cool glider. I lost my pet hamster on one of these things when I was a kid. Stupid animal flew straight into a tree-mulching machine! Gross-a-rama!
|
||||
```
|
||||
|
||||
### Bitchen'
|
||||
|
||||
```
|
||||
[4118] (diff score: 11)
|
||||
UK: It's a sliding door. Neat.
|
||||
US: It's a sliding door. Bitchen.
|
||||
|
||||
[3211] (diff score: 7)
|
||||
UK: Part of the P.A. system.
|
||||
US: Part of the P.A. system. Bitchen'
|
||||
|
||||
[5458] (diff score: 12)
|
||||
UK: It's a nice fire axe.
|
||||
US: It's a nice fire ax. Bitchen'!
|
||||
|
||||
[2523] (diff score: 11)
|
||||
UK: These toys are cool.
|
||||
US: These toys are bitchen'.
|
||||
|
||||
[4601] (diff score: 73)
|
||||
UK: These suckers work underwater too. Looks like folks lose more than they think in the smallest room around here.
|
||||
US: Whoa, bitchen! These suckers work underwater too.
|
||||
|
||||
[6477] (diff score: 66)
|
||||
UK: It's a door!
|
||||
US: This leads back out into the corridor. I might be able to escape. Bitchen!
|
||||
|
||||
[3285] (diff score: 30)
|
||||
UK: These are cool. I could have my own disco.
|
||||
US: Whoa! Check it out, Retro! These are bitchen. I could have my own disco.
|
||||
|
||||
[3534] (diff score: 26)
|
||||
UK: Hey, Deluge! Did you see yourself on TV? You looked gnarly, man.
|
||||
US: Hey, Deluge! Did you see yourself on TV? You were bitchen.
|
||||
|
||||
[4010] (diff score: 20)
|
||||
UK: I can hear the music from here. It's really loud!
|
||||
US: Whoa, I can hear the music from here. It's way loud! Bitchen!
|
||||
|
||||
[4845] (diff score: 19)
|
||||
UK: A ball of paper, ideal for playing office basketball.
|
||||
US: A ball of paper. Bitchen! Perfect for playing office basketball.
|
||||
|
||||
[5477] (diff score: 15)
|
||||
UK: Hey, by putting this across the tunnel I can exert an even amount of pressure on the sign.
|
||||
US: Hey, by putting this across the tunnel I can exert an even pressure on the sign. Bitchen'.
|
||||
|
||||
[5878] (diff score: 59)
|
||||
UK: Hey, we are going to see the Sun, right? Just in time for Paul's mighty meeting up at the stadium.
|
||||
US: Oh yeah, we're going to see the Sun, that would be bitchen. I've always wanted to get a tan. Just in time for Paul's mighty meeting up at the stadium.
|
||||
|
||||
[2404] (diff score: 51)
|
||||
UK: You can create weird lightning effects with these. Cheesy but fun.
|
||||
US: You can create weird lightning effects with these. They're bitchen; been around for about 300 years!
|
||||
|
||||
[5701] (diff score: 46)
|
||||
UK: You keep saying 'WE'. The only one of you who helps in any way is old, mad and incontinent. I don't know why I'm risking my skin to satisfy your crazy plans!
|
||||
US: Yeah, it's bitchen! Except, who's 'WE', you gotta mouse in your pocket?. The only one of you who helps in any way is old, mad and incontinent. I don't know why I'm risking my skin to satisfy your crazy plans!
|
||||
```
|
||||
|
||||
### Is This Even Dialogue?
|
||||
|
||||
```
|
||||
[1692] (diff score: 6)
|
||||
UK: Use the slider to alter the volume of in-game speech.
|
||||
US: Yo babe. Use the slider to alter the volume of in-game speech.
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
```
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
```
|
19553
all-subtitles-uk-us.txt
Normal file
19553
all-subtitles-uk-us.txt
Normal file
File diff suppressed because it is too large
Load diff
5731
diff-subtitles-uk-us.txt
Normal file
5731
diff-subtitles-uk-us.txt
Normal file
File diff suppressed because it is too large
Load diff
47
diffscript.py
Normal file
47
diffscript.py
Normal file
|
@ -0,0 +1,47 @@
|
|||
import pprint
|
||||
import re
|
||||
|
||||
IGNORED_LINES = set(range(6180, 6198))
|
||||
|
||||
def readstring(f):
|
||||
bytes = b''
|
||||
while True:
|
||||
byte = f.read(1)
|
||||
if byte == b'\0':
|
||||
break
|
||||
bytes += byte
|
||||
return bytes.decode('latin-1')
|
||||
|
||||
def parsedat(filename):
|
||||
with open(filename, "rb") as f:
|
||||
offsets = []
|
||||
while f.tell() == 0 or f.tell() < offsets[0]:
|
||||
offsets.append(int.from_bytes(f.read(4), 'little'))
|
||||
lines = []
|
||||
for offset in offsets:
|
||||
if offset != 0:
|
||||
f.seek(offset)
|
||||
lines.append(readstring(f))
|
||||
else:
|
||||
lines.append('')
|
||||
return lines
|
||||
|
||||
def dumplines(filename, lines1, lines2):
|
||||
with open(filename, "wt") as f:
|
||||
for line1, line2, lineno in zip(lines1, lines2, range(len(lines1))):
|
||||
f.write(f"[{lineno}]\nUK: {line1}\nUS: {line2}\n")
|
||||
|
||||
def diffscore(line1, line2):
|
||||
diffset = set(re.split(r"\W", line1.lower())) ^ set(re.split(r"\W", line2.lower()))
|
||||
return sum(len(word) for word in diffset)
|
||||
|
||||
def scorelines(filename, lines1, lines2):
|
||||
scored = [(diffscore(line1, line2), lineno, line1, line2) for line1, line2, lineno in zip(lines1, lines2, range(len(lines1))) if diffscore(line1, line2) > 0]
|
||||
scored.sort(reverse=True, key=lambda tuple: tuple[0])
|
||||
with open(filename, "wt") as f:
|
||||
for score, lineno, line1, line2 in scored:
|
||||
if lineno not in IGNORED_LINES:
|
||||
f.write(f"[{lineno}] (diff score: {score})\nUK: {line1}\nUS: {line2}\n")
|
||||
|
||||
dumplines("all-subtitles-uk-us.txt", parsedat("lang.dat.uk"), parsedat("lang.dat.us"))
|
||||
scorelines("diff-subtitles-uk-us.txt", parsedat("lang.dat.uk"), parsedat("lang.dat.us"))
|
BIN
lang.dat.uk
Normal file
BIN
lang.dat.uk
Normal file
Binary file not shown.
BIN
lang.dat.us
Normal file
BIN
lang.dat.us
Normal file
Binary file not shown.
Loading…
Reference in a new issue