I am running test to select an MT API, and while testing the Microsoft Translator have found that I get different results for the same sentence using the API from a script than what I get when passing the whole URL to the Web Translator.
For this sentence in EN source:
AppFlow is supported on NetScaler appliances running version 9.3 and above with nCore build.
(first FAQ in https://docs.citrix.com/en-us/netscaler/12-1/networking-faq/appflow-faq.html)
I get this result for FR, when passing that single sentence for translation in the https://www.bing.com/translator page and via a Python script calling the API:
AppFlow est pris en charge sur les appliances NetScaler qui exécutent la version 9,3 et plus avec ncore Build.
However, the same sentence in the whole translated URL in Web Translator reads:
AppFlow est pris en charge sur les appliances NetScaler exécutant la version 9.3 et ci-dessus avec nCore construire.
(https://www.microsofttranslator.com/bv.aspx?from=en&to=fr&a=https%3A%2F%2Fdocs.citrix.com%2Fen-us%2Fnetscaler%2F12-1%2Fnetworking-faq%2Fappflow-faq.html)
My understanding is that the API now works with NMT by default. I would like to understand why Web Translator presents a different result. I was going to do some assessment by passing URLs into Web Translator, but if this is not using the API with NMT, then I cannot use this method.
Thank you.
Version 3 of the Translator API defaults to NMT. http://bing.com/translator also defaults to NMT.
The full web page translation in bing.com and the Edge browser extension still use SMT for most language pairs, including English<>French. This is for scalability reasons.
Related
so I have 2 json file
The first json file looks like this
`{
"text": "Through your use of the site, you may have the opportunities to engage in commercial transactions with other users and vendors. You acknowledge that all transactions relating to any merchandise or services offered by any party, including, but not limited to the purchase terms, payment terms, warranties, guarantees, maintenance and delivery terms relating to such transactions, are agreed to solely between the seller or purchaser of such merchandize and services and you. WE MAKE NO WARRANTY REGARDING ANY TRANSACTIONS EXECUTED THROUGH, OR IN CONNECTION WITH THIS SITE, AND YOU UNDERSTAND AND AGREE THAT SUCH TRANSACTIONS ARE CONDUCTED ENTIRELY AT YOUR OWN RISK. ANY WARRANTY THAT IS PROVIDED IN CONNECTION WITH ANY PRODUCTS, SERVICES, MATERIALS, OR INFORMATION AVAILABLE ON OR THROUGH THIS SITE FROM A THIRD PARTY IS PROVIDED SOLELY BY SUCH THIRD PARTY, AND NOT BY US OR ANY OTHER OF OUR AFFILIATES.",
"section": [
"Disclaimer of Warranties"
]
},
{
"text": "Content available through this site often represents the opinions and judgments of an information provider, site user, or other person or entity not connected with us. We do not endorse, nor are we responsible for the accuracy or reliability of, any opinion, advice, or statement made by anyone other than an authorized britnex spokesperson speaking in his/her official capacity. Please refer to the specific editorial policies posted on various sections of this site for further information, which policies are incorporated by reference into these Terms of Use.",
"section": [
"Disclaimer of Warranties"
]
}`
and the other json file looks like this:
{
"text": "vigueur étendula création d'un organisme spécifique au sein de l'OPCO et d'une association paritaire nationale pour la mise en œuvre des garanties sociales des salariés, dénommée APNI, de construire un socle de droits collectifs en vue :",
"section": "[]"
},
{
"text": "– d'assurer l'effectivité par la mutualisation des droits sociaux attachés aux salariés par leur mise en œuvre ;",
"section": "[]"
},
I want to replace the content of "text" in first json file with content of second json file.
Please any help to do that with python.
Thanks
If you have it in json file you could do this:
import json
with open("name_file.json", 'r') as o:
raw_json = o.read()
python_list = json.loads(a)
and then you have list which you can modify easily
As some of you may know Facebook is migrating its users pages progressively to what is called the "New Page Experience" (NPE), the thing is some previous endpoints and data such as "locations" are not available by the same means anymore, for NPE you need to use the page token.
In my case, I used to do the following query on the facebook-graph-api with a facebook user token:
me/accounts?fields=access_token,category,tasks,name,is_published,locations.limit(100){access_token,category,name,is_published,parent_page}
This returned a JSON array with all the pages linked to the account of the user token, and the associated locations for each page.
However since the New Page Experience partial migration, if at least one page has been migrated to New Experience by Facebook, the whole call returns an error
{
"error": {
"message": "Invalid OAuth 2.0 Access Token",
"type": "OAuthException",
"code": 190,
"error_subcode": 2069032,
"is_transient": false,
"error_user_title": "Token d’accès utilisateur non pris en charge",
"error_user_msg": "Un token d’accès de Page est requis pour cet appel dans la nouvelle version des Pages."
}
Facebook has added a boolean field on pages called has_transitioned_to_new_page_experience, which should allow us to filter the pages.
However it doesn't seem to work, I've tried thing such as (true, 1, "true"...) which do work for other boolean parameters but not for has_transitioned_to_new_page_experience :
me/accounts?has_transitioned_to_new_page_experience=true // return all pages without filtering
me/accounts?is_place=true // Filters properly based on if the page is a place
I'd like to be able to single out the NPE, or do a filtered query to avoid needless calls through loops and array management, as most of the pages are still not NPE yet, and this would allow me to keep my code for "legacy pages" untouched.
Have any of you experienced this issue, or been able to solve it?
Maybe talk with the Facebook dev support?
Do you think this behavior is buggy?
Thanks!
I'm using Google Cloud Vision API to do OCR in images. Currency signs can prove to be very vital in solution to my problem
Problem that I encountered: Google Cloud Vision API fails to detect certain currency signs(Rupee(₹) in my case)
I tried running the API for this image in 2 ways
I wrote a python program for detection as per the reference: documentation
The output that I got
3. 己 AB 长 Rp CHF f Ft € も 元 Jy 手 le # 夫 %24
Clearly it is failing for some cases.
I tried the demo available on the website.
The output that I got
C A 요 한 ₹ Л В R p * C 元 C H F } F t m 元
with the bounding boxes as
I expected them to have the same outputs. The second one is able to detect Ruppe sign(₹) which I need. I cannot use the demo version in my project. It needs to run on batch of images. Is there any workaround by which I can detect currency sign in the script also.
Run it with Document_text_detection instead of text_detection
I have some problems while following the tutorial: "Tutorial: Create a Custom Browser Guide" in Neo4j.
I get stuck at the point where I should pass the adoc file to HTML.
My prompt is giving me this feedback in Spanish
"/run.sh" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable.
Translated into English:
"/run.sh" could no be recognized as an internal o external command, programm or executable file"
Here you can find the part of the tutorial, where I get stuck.
Pass the test.adoc file to the run.sh script (as shown below) to
convert to the HTML slides.
./run.sh adoc/test.adoc html/test.html
#optional arguments, leveloffset - to change the heading level up or down, base-url and additional attributes
./run.sh path/to/test.adoc path/to/test.html [+1] https://example.com/guides/test
#run the local python server to serve on localhost:8001
python http-server.py
I am using microsoft custom translator hub for translation.
Currently I am trying to train only one work for which I have created training file with 10,000 sentences for english and spanish. In training also I am using the same parallel files.
For some documents its working fine but for some it throws "DataProcessingFailed" error.
Is there any log file where I can see the error cause?
My Training file is as follows:
The party has signed below
The party has signed below
The party has signed below
The party has signed below
The party has signed below
The party has signed below
The party has signed below
The party has signed below
10,000 times this line
Spanish file
La parte ha firmado a continuación
La parte ha firmado a continuación
La parte ha firmado a continuación
La parte ha firmado a continuación
La parte ha firmado a continuación
La parte ha firmado a continuación
La parte ha firmado a continuación
10,000 times this line
Thanks
You'll need to submit 10000 different sentences to train a custom model using Custom Translator. Or you can use a dictionary if you want Microsoft Translator to translate an instance in a source phrase or sentence using the translation you provided in the dictionary.