{"ygPerms":{"resourceCapabilityList":[{"resourceType":"GROUP","capabilities":[{"name":"UPDATE"},{"name":"READ"},{"name":"WELCOME_MSG"},{"name":"PENDING_COUNT"},{"name":"ACTIVITY_LOGS"}]},{"resourceType":"PHOTO","capabilities":[{"name":"READ"},{"name":"READ"},{"name":"UPLOAD"},{"name":"UPDATE"},{"name":"DELETE"},{"name":"COPY"},{"name":"MOVE"},{"name":"APPROVE"},{"name":"UPLOADTEMP"},{"name":"GROUPCOVER"}]},{"resourceType":"FILE","capabilities":[{"name":"READ"},{"name":"CREATE"},{"name":"UPDATE"},{"name":"DELETE"},{"name":"AUTO_SEND"}]},{"resourceType":"MEMBER","capabilities":[{"name":"READ"},{"name":"READ"},{"name":"EDIT_MODERATOR"},{"name":"DELETE"},{"name":"CREATE"},{"name":"UPDATE"},{"name":"BAN"}]},{"resourceType":"LINK","capabilities":[{"name":"READ"},{"name":"CREATE"},{"name":"UPDATE"},{"name":"DELETE"},{"name":"MOVE_LINK"}]},{"resourceType":"CALENDAR","capabilities":[{"name":"READ"}]},{"resourceType":"DATABASE","capabilities":[{"name":"READ"},{"name":"READ_DATA"},{"name":"CREATE"}]},{"resourceType":"POLL","capabilities":[{"name":"READ"},{"name":"VOTE"},{"name":"UPDATE"},{"name":"CREATE"},{"name":"DELETE"},{"name":"CLOSE"}]},{"resourceType":"MESSAGE","capabilities":[{"name":"CREATE"},{"name":"READ"},{"name":"DELETE"}]},{"resourceType":"PENDING_MESSAGE","capabilities":[{"name":"READ"},{"name":"UPDATE"},{"name":"DELETE"}]},{"resourceType":"ATTACHMENTS","capabilities":[{"name":"READ"},{"name":"DELETE"}]},{"resourceType":"PHOTOMATIC_ALBUMS","capabilities":[{"name":"READ"},{"name":"UPLOAD"}]},{"resourceType":"MEMBERSHIP_TYPE","capabilities":[{"name":"READ"},{"name":"CREATE"},{"name":"DELETE"},{"name":"UPDATE"}]},{"resourceType":"POST","capabilities":[{"name":"READ"},{"name":"DELETE"},{"name":"CREATE"},{"name":"UPDATE"}]},{"resourceType":"PIN","capabilities":[{"name":"READ"},{"name":"DELETE"},{"name":"CREATE"},{"name":"UPDATE"}]}],"modStatus":"MODERATOR","subStatus":"NORMAL","groupUrl":"groups.yahoo.com","intlCode":"us"},"comscore":"pageview_candidate","ygData":{"userId":207968719,"authorName":"Robert Tucker","from":"&quot;Robert Tucker&quot; &lt;roberttucker@fastmail.fm&gt;","profile":"roberttucker","replyTo":"LIST","senderId":"sLo-buRqYnMVNUGvNfxWFch0S5Lf9nzVIHM2Jah-9BxHvOQZontgfNa5adX8f_6NxNQRl7bJHQNGCFW4Vcn0oCYac57jPjfBENWIQRwgub1_","spamInfo":{"isSpam":false,"reason":"12"},"subject":"Re: [OmT] Aligning existing translations","postDate":"1129801508","msgId":3174,"canDelete":true,"contentTrasformed":false,"systemMessage":false,"headers":{"messageIdInHeader":"PGRqN292NCs4cGJpQGVHcm91cHMuY29tPg==","inReplyToHeader":"PDQzNTczQUEzLjQwNjAzMDVAdGV4dGpvYi5kZT4="},"prevInTopic":3173,"nextInTopic":3175,"prevInTime":3173,"nextInTime":3175,"topicId":3164,"numMessagesInTopic":16,"msgSnippet":"... Sorry if you have a programming background, but â€ are you sure you have Python installed correctly? If you typed: print Hello, World! into a text","rawEmail":"Return-Path: &lt;roberttucker@fastmail.fm&gt;\r\nX-Sender: roberttucker@fastmail.fm\r\nX-Apparently-To: OmegaT@yahoogroups.com\r\nReceived: (qmail 7433 invoked from network); 20 Oct 2005 09:45:14 -0000\r\nReceived: from unknown (66.218.66.217)\n  by m32.grp.scd.yahoo.com with QMQP; 20 Oct 2005 09:45:14 -0000\r\nReceived: from unknown (HELO n25.bulk.scd.yahoo.com) (66.94.237.54)\n  by mta2.grp.scd.yahoo.com with SMTP; 20 Oct 2005 09:45:14 -0000\r\nComment: DomainKeys? See http://antispam.yahoo.com/domainkeys\r\nReceived: from [66.218.69.1] by n25.bulk.scd.yahoo.com with NNFMP; 20 Oct 2005 09:45:11 -0000\r\nReceived: from [66.218.66.75] by mailer1.bulk.scd.yahoo.com with NNFMP; 20 Oct 2005 09:45:10 -0000\r\nDate: Thu, 20 Oct 2005 09:45:08 -0000\r\nTo: OmegaT@yahoogroups.com\r\nMessage-ID: &lt;dj7ov4+8pbi@eGroups.com&gt;\r\nIn-Reply-To: &lt;43573AA3.4060305@textjob.de&gt;\r\nUser-Agent: eGroups-EW/0.82\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset=&quot;ISO-8859-1&quot;\r\nContent-Transfer-Encoding: quoted-printable\r\nX-Mailer: Yahoo Groups Message Poster\r\nX-Yahoo-Newman-Property: groups-compose\r\nX-Originating-IP: 66.94.237.54\r\nX-eGroups-Msg-Info: 1:12:0:0\r\nX-Yahoo-Post-IP: 213.162.106.173\r\nFrom: &quot;Robert Tucker&quot; &lt;roberttucker@fastmail.fm&gt;\r\nSubject: Re: [OmT] Aligning existing translations\r\nX-Yahoo-Group-Post: member; u=207968719; y=2z18Um9Db8AtFrOll7jl4RgocuI0VKdeHy2_yJ_-GBbNtvAXi25K\r\nX-Yahoo-Profile: roberttucker\r\n\r\n--- In OmegaT@yahoogroups.com, Michaela M=C3=BCller &lt;listen@t...&gt; wrote:\n&gt;\n=\r\n&gt;I don&#39;t know how to make the necessary line changes in the \n&gt; script, beca=\r\nuse the command window only pops up for a short time.\n&gt; c) I opened both do=\r\ncuments and saved them as &quot;only text&quot; because the \n&gt; documentation doesn&#39;t =\r\nsay if you need to save it as text with line \n&gt; breaks/formatting.\n\nSorry i=\r\nf you have a programming background, but =E2=80&quot; are you sure you\nhave Pyth=\r\non installed correctly?\n\n\nIf you typed:\n\nprint &quot;Hello, World!&quot;\n\ninto a text=\r\n editor and saved it as a file hello.py would you get\n=E2=80=9CHello World=\r\n=E2=80=9D printed out at the command line if you ran:\n\npython hello.py\n\n\nIf=\r\n this works or you are otherwise sure you have Python up and running\ncorrec=\r\ntly, I have slightly edited Dmitri&#39;s script so that it asks at\nthe command =\r\nline for the names (and paths to) the source and target\nfiles, the name the=\r\n created tmx is to be called (and path) and the\nlanguage of the source and =\r\ntarget text.\n\nSo if you paste the following into your text editor (I hope t=\r\nhe\nindentations come out in the post =E2=80&quot; they need to be there):\n\n\nimpo=\r\nrt sys\nimport re\n\ndef safestring(s):\n    return (s.replace(&quot;&lt;&quot;, &quot;&lt;&quot;)).re=\r\nplace(&quot;&gt;&quot;, &quot;&gt;&quot;)\n\npartext1 =3D raw_input(&quot;Name of first file (with path):=\r\n &quot;)\npartext2 =3D raw_input(&quot;Name of second file (with path): &quot;)\ntmxname=3Dr=\r\naw_input(&quot;Name of tmx (with path): &quot;)\n\nfonto=3Dfile(partext1, &quot;r&quot;)\ntradukaj=\r\nxo=3Dfile(partext2, &quot;r&quot;)\nftxt=3Dfonto.readlines()\nfonto.close()\nttxt=3Dtrad=\r\nukajxo.readlines()\ntradukajxo.close()\nfntlng =3D raw_input(&quot;Source Language=\r\n: &quot;)\ncellng =3D raw_input(&quot;Target Language: &quot;)\n\nif len(ftxt) !=3D len(ttxt)=\r\n:\n    print(&quot;Error! Paragraph quantities in source and target texts do\nnot =\r\nmatch - unable to proceed&quot;)\n    sys.exit(0)\n\ntmxfile=3Dfile(tmxname, &quot;w&quot;)\nt=\r\nmxfile.write(r&#39;&lt;?xml version=3D&quot;1.0&quot; encoding=3D&quot;UTF-8&quot;?&gt;&#39; + &quot;&#92;n&quot; +\nr&#39;&lt;!DOC=\r\nTYPE tmx SYSTEM &quot;tmx11.dtd&quot;&gt;&#39; + &quot;&#92;n&quot; + r&#39;&lt;tmx version=3D&quot;1.1&quot;&gt;&#39; +\n&quot;&#92;n&quot; + r&quot;=\r\n  &lt;header&quot; + &quot;&#92;n&quot; + r&#39;    creationtool=3D&quot;org.omegat.OmegaT&quot;&#39; +\n&quot;&#92;n&quot; + r&#39;  =\r\n  creationtoolversion=3D&quot;1&quot;&#39; + &quot;&#92;n&quot; + r&#39;   \nsegtype=3D&quot;paragraph&quot;&#39; + &quot;&#92;n&quot; +=\r\n r&#39;    o-tmf=3D&quot;org.omegat.OmegaT TMX&quot;&#39; +\n&quot;&#92;n&quot; + r&#39;    adminlang=3D&quot;&#39; + fnt=\r\nlng +&#39;&quot;&#39; + &quot;&#92;n&quot; + r&#39;    srclang=3D&quot;&#39; +\nfntlng +&#39;&quot;&#39; + &quot;&#92;n&quot; + r&#39;    datatype=\r\n=3D&quot;plaintext&quot;&#39; + &quot;&#92;n&quot; + r&#39;  &gt;&#39; +\n&quot;&#92;n&quot; + r&#39;  &lt;/header&gt;&#39; + &quot;&#92;n&quot; + r&#39;  &lt;body&gt;=\r\n&#39; + &quot;&#92;n&quot;)\n\nfor x in ftxt:\n    if x.isspace():\n        pass\n    elif x.strip=\r\n() =3D=3D ttxt[(ftxt.index(x))].strip():\n        pass\n    else:\n        tmx=\r\nfile.write(r&#39;    &lt;tu&gt;&#39; + &quot;&#92;n&quot; + r&#39;      &lt;tuv lang=3D&quot;&#39; +\nfntlng + r&#39;&quot;&gt;&#39; + &quot;=\r\n&#92;n&quot; + r&#39;        &lt;seg&gt;&#39; + safestring(x.strip()) +\nr&#39;&lt;/seg&gt;&#39; + &quot;&#92;n&quot;+ r&#39;      =\r\n&lt;/tuv&gt;&#39; + &quot;&#92;n&quot; + r&#39;      &lt;tuv lang=3D&quot;&#39; +\ncellng + &#39;&quot;&gt;&#39; + &quot;&#92;n&quot;+ r&#39;        &lt;=\r\nseg&gt;&#39; +\nsafestring(ttxt[(ftxt.index(x))].strip()) + r&#39;&lt;/seg&gt;&#39; + &quot;&#92;n&quot; + r&#39;  =\r\n  \n &lt;/tuv&gt;&#39; + &quot;&#92;n&quot; + r&#39;    &lt;/tu&gt;&#39; + &quot;&#92;n&quot;)\n\ntmxfile.write(r&#39;  &lt;/body&gt;&#39; + &quot;&#92;n=\r\n&quot; + r&#39;&lt;/tmx&gt;&#39;)\ntmxfile.close()\nprint(&quot;Finished&quot;)\n\n\nand save it as say align=\r\ner_edited.py when you run:\n\npython aligner_edited.py\n\nyou should get a comm=\r\nand line message:\n\nName of first file (with path):\n\nwhen you would type in =\r\nthe path (and filename) of your source text and\nso on.\n\n\nIf you do not have=\r\n equal segments in the source and target texts\n(which may well ultimately p=\r\nrove to be your main problem) you should\nget the message:\n\nError! Paragraph=\r\n quantities in source and target texts do not match -\nunable to proceed\n\n\nD=\r\nidier Briel&#39;s script may be more useful regarding segmentation =E2=80&quot; see\n=\r\nMessage 3127\n\n\nRegards\n\nRobert\n\n\n\n\n"}}