DataProcessingFailed in Microsoft Custom Translator? Is there any log file? - microsoft-translator

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.

Related

replace content of json files

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

Facebook Filtering New Page Experience

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!

Problems while following the tutorial: "Tutorial: Create a Custom Browser Guide" in Neo4j

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

Primefaces application stops working when click button

Hello please help with the following problem
At times the network is slow and my application programmed in java with primefaces 6.0 and glassfish 3.1 stops working
When I open the page it is shown and the values of the components are load a few seconds late, when clicking on a button when the values of the whole page are not loaded, an error is presented and the application stops working.
Example:
1)The screen is presented and the values of the p: selectOneMenu are not loaded
2)When clicking on the first button, shows the following error:
Javascript error:
Error de lectura XML: sección CDATA no cerrada Ubicación: http://localhost:8080/....pag1.xhtml Número de línea 2, columna 43: ....pag1.xhtml:2:43
Error de lectura XML: sección CDATA no cerrada Ubicación: http://localhost:8080/....pag1 Número de línea 2, columna 43: ....pag1.xhtml:2:43
TypeError: PF(...) is undefined
Java error:
Grave: JSF1073: se ha interceptado javax.faces.event.AbortProcessingException durante el procesamiento de RENDER_RESPONSE 6 : UIComponent-ClientId=, Mensaje=java.lang.NullPointerException
Grave: java.lang.NullPointerException
javax.faces.event.AbortProcessingException: java.lang.NullPointerException
at org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:303)
3)Seconds later load the values of p: selectOneMenu but the application stopped working due to the previous error.
Now if I open the screen and wait until the values of p: selectOneMenu are loaded, the screen works correctly
How can i fix this

Different results with Microsoft Translator API / Web Translator

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.