Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
turbos10
Posts: 31
Joined: Fri Apr 27, 2007 2:05 am

detect language

Fri Jul 04, 2008 2:57 pm

DetectLanguage ? it must be gziped base64 or not?
I alweys get middlefrisian lang. what i do bad?
My XML example

<?xml version="1.0" encoding="utf-8"?><methodCall><methodName>DetectLanguage</methodName><params><param><value><string>1jha9u1q1h1240iqr456i92a74</string></value></param><param><value><struct><value><string>+eJxtV9lS40gWfXeE/yH7iZfEoS218ND9W/V5VA8MHlxegK7oiZgiShZKW1hSWktUwYRp3OemlrGIeSBAIu/Ju5x77pUxHhnmhWFcmII7hsHOz39leKIXAbcDezw6O1vc3i8+X6/YH9PZl5uzs/FoX8i4rMIoPcpqPBqPTIBoG8viwjoFsRzuW8F49OnTpynbqyxPKnnB8rBkJSvk+liFWcI2saxYlJQyTX6Gk8mEIK0e0uWGM4D0eRD449EizhXLZSSLXEkWR8lG5onk41HCjmxfJDuVv9QswlVRKX9oULsDtQ3u+qegtsU9YYxHX1WhXmX+tlNsG7b+sr8qpc2d3tzmtjswd7llw6dz9kVtJEyyXLK9RJrC6o1VqmLF+24b7n6jI/OQvVSKqRzOZb8RsOiBXe4P/Qq4MAPyC7HECkkHXhmpZ1ZWRfhD0V97lSaldtDtcQLuD5LmWFTd8egmfJEZ3dvZ70J48JDBVQJW66QI4X/5pv3yOjzH5u6AHI5o8vXwFMZhmnCWJWUlCzaXz3uZamf83tjjwYAUwuKmsP4Ps9hHYgUdhrC5MUiM8LjrId47FWWyrECFkp2dPWZXyTJhD6pI4yh8jomsoKfRw/jcO3EFxLe47eCWZaGSbaRweaSAczdlj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WtKzt9veJwaqFF16zai1VfsQ8hJvJDsz4pfutzb3eHMH6p+ZQS49YNZcsrzdg91qlb2ho8lRFE/a5eczbf09OL1I5Z+gqNAaRobnJ726yP1YeQ8QLrKbyAGr2PTvozzsfz2Nok/Kds+9sm1P2aKkjluThu+68jw6wpSJ2Nk/N6mb08MGHvEEb7UD3+LzWi1nVlvr1TQvdwzp9j3cJsTTpbq0gUCXboaRldNweIrxpGe+Y3UXOcGXBC2yyNPvO2VWdhe9cX6bRJu3tTSPl8iVvF86+fRwsdIOkQEF1EttI4doOFCuqGpyiBTEBd6h04FAD1bcKVqlhfqF6gXDIhVlIO3Ul13LCFoDcUMNhe84o7ojt6qKU2tdFk4r/vcIFfR/RanYSuEcqagtaQ1Q1wTyhHROMn6BK3YadyfyoaeO0/QQje7AE4QVgqVm/k1s0F5KUfHitM6yuMH58BgcOqD02eL33N4BuD+gP1gHvwrSbejxkKj2+w51C7qCF5E8POiXt0BI3Afswdt/kFimiBfoJy3fx3sTudZeYQ/J6JCqCVGCuQRMdducgbCEliCFW6SY/tLdSXprG0tB+D/3Rf6wIDunPd/BmoztzT8jkaIVvqxohIeOsCneNk0GHZA23OE+LgYeLdP05S06CbhKQh6j0j5yinaKtYqofU0W9gRCzqzDSz32zCaO/yR9MII/EwA4M3bNIodJfcL2g0LJB2/8bS36wutyrndKjvwE1O1BgnCqtR0toEHit+xN2D6XC91sZZi0/mg4QVgdAE3VALbSqJ4QmKKWLt5+mrTSJtnV8IrJ1UgKfppouwVKVaf0agoF6rD7oL1x8luDbr8BWm7chOD2QPdgvfZqGBq2mc9qgYiw6WA7W9UutyYAniBEESA+RZkYL0WO5g3bDCygcLS03OYkMvq0TVoTbuAg3jXDlqpMybEZ/A2Sa1i8=</string></value></struct> </value></param></params></methodCall>
!Xml recived:



<?xml version="1.0" encoding="utf-8"?><methodResponse><params> <param> <value> <struct> <member> <name>status</name> <value> <string>200 OK</string> </value> </member> <member> <name>data</name> <value> <struct> <member> <name>3a6bf3bf41a0eea4726b4a6e7aaf3193</name> <value> <string>middlefrisian</string> </value> </member> </struct> </value> </member> <member> <name>seconds</name> <value> <double>1.255</double> </value> </member> </struct> </value> </param></params></methodResponse>

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Mon Jul 21, 2008 10:01 am

Please edit your post or use a code sharing site like pastebin. Your post is breaking the forum display and it's hard to help you that way.

The subtitled must be first gzipped (without headers) and then base64'd. Are you making sure no headers are included?

Also, remember that the language detection routines are not perfect. If they don't provide the correct language then you need to put it in manually (which means most programs will need to have a "confirm" step).

Does the md5 hash correspond to your file? That's an easy way to know if the text is being transferred correctly.

Also, do you have a link to the subtitle you're testing?
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

User avatar
eduo
Posts: 716
Joined: Sat Feb 10, 2007 1:40 am
Location: Information Technology
Contact: ICQ Website Yahoo Messenger

Thu Jul 24, 2008 2:28 am

I am having similar problems with the DetectLanguage method. I suspect my Gzip + Base64 encode routine is not right but I have no way to know. When I try decoding it it works.

This is my test file:
http://eduo.info/hdp/DetectLanguage-out-TEST.xml

This is the response file:
http://eduo.info/hdp/DetectLanguage-in-TEST.xml

It contains the full base64 gzipped contents. Every file I throw at the method comes up as "jpn".

I need to know what is OpenSubtitles seeing. What is being shown as the decoded contents of the files. Otherwise it'll be impossible to know what's going on (Text Encodings, Endianness, etc.)

Please reply. Lately all my forum posts are ignored.
http://eduo.info/
[url=http://eduo.info/soleol/]OpenSubtitles from your desktop: SolEol for Mac/Windows/Linux[/url]
[url=http://forums.plexapp.com/index.php?showtopic=325&st=0&p=2480&#entry2480]My current episode processing work flow[/url].

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 24 guests