Skip to main content
Question

given unlimited numbers in the raw source the numbers converted in to the another language it possible or not

  • Dec 23, 2019 6:08 AM UTC
  • 11 replies
  • 109 views

tomjerry.vl
Forum|alt.badge.img

review above attached pic the unlimited numbers converted into the Portuguese language how to possible

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

11 replies

danilo_fme
Celebrity
Forum|alt.badge.img+58
  • Celebrity
  • Dec 23, 2019 1:58 PM UTC

Hi @tomjerry.vl

This is possible if you use some API. Fox example: you can read your File and use the transformer HTTPCaller to connect a URL - API.

The results will be in Json or XML format - then you can use transformers for these formats to extract the nformations.

Do you know any API free to use?

 

Thanks,

Danilo


Forum|alt.badge.img
  • Dec 23, 2019 2:10 PM UTC

This would have been so much worse if you needed French. :-D

Here's my solution. Put your source data in place of my first AttributeCreator and fill up the StringPairReplacers:


Forum|alt.badge.img
  • Dec 23, 2019 2:14 PM UTC

This would have been so much worse if you needed French. :-D

Here's my solution. Put your source data in place of my first AttributeCreator and fill up the StringPairReplacers:

Oh, and you need to remove the regex "e Zero$" from the result as well, for numbers ending with zero that aren't actually zero.


david_r
Celebrity
  • Dec 23, 2019 2:32 PM UTC

This would have been so much worse if you needed French. :-D

Here's my solution. Put your source data in place of my first AttributeCreator and fill up the StringPairReplacers:

Would it work in German as well? They say six-and-eighty rather than eigthy-six :-)


Forum|alt.badge.img
  • Dec 23, 2019 3:12 PM UTC

Would it work in German as well? They say six-and-eighty rather than eigthy-six :-)

No, I think we are lucky that the question was about Portuguese. :-)


redgeographics
VIP
Forum|alt.badge.img+63

No, I think we are lucky that the question was about Portuguese. :-)

Good thing it's not French... (4 * 20) + 10 + 9


Forum|alt.badge.img
  • Dec 23, 2019 7:01 PM UTC

Good thing it's not French... (4 * 20) + 10 + 9

Yes, French would require Python I guess. :-D

 

And btw, to @tomjerry.vl, I forgot that you would have to add a StringReplacer at the end to convert numbers 11-19, from "Dez e Um" to "Onze" and so on.

tomjerry.vl
Forum|alt.badge.img

This would have been so much worse if you needed French. :-D

Here's my solution. Put your source data in place of my first AttributeCreator and fill up the StringPairReplacers:

I execute this workbench but not getting the result this workbench consider only last characters in street name like

like

in this name your work considered only last characters and numbers remaining not consider others

please ex-plane how to resolve this situation

 


Forum|alt.badge.img
  • Dec 27, 2019 10:11 AM UTC

I execute this workbench but not getting the result this workbench consider only last characters in street name like

like

in this name your work considered only last characters and numbers remaining not consider others

please ex-plane how to resolve this situation

 

Put a new AttributeCreator before your AttributeCreator_2 where you create the new attribute "Digits" with the value:

 

@ReplaceRegEx(@Value(STRT_NAME),[^\\d+],"")

Then modify your AttributeCreator_2 to use the new attribute like this:

 

@Substring(@Value(Digits),-1,1)

 

and so on.

This will give you the numbers and translate them into text. Finally you need to use a StringReplacer for your street name where you search for @Value(Digits) and replace with _result.


tomjerry.vl
Forum|alt.badge.img

Put a new AttributeCreator before your AttributeCreator_2 where you create the new attribute "Digits" with the value:

 

@ReplaceRegEx(@Value(STRT_NAME),[^\\d+],"")

Then modify your AttributeCreator_2 to use the new attribute like this:

 

@Substring(@Value(Digits),-1,1)

 

and so on.

This will give you the numbers and translate them into text. Finally you need to use a StringReplacer for your street name where you search for @Value(Digits) and replace with _result.

Thanks @danullen

It's working and one more extension i.e if i get value like this "path 44 highway 99"

it return 4499 but it is wrong.

i need to calculate 44 in digit and 99 in some other field like digit_1


Forum|alt.badge.img
  • Dec 31, 2019 10:25 AM UTC

Thanks @danullen

It's working and one more extension i.e if i get value like this "path 44 highway 99"

it return 4499 but it is wrong.

i need to calculate 44 in digit and 99 in some other field like digit_1

You can just continue with the regular expressions. You can test for these special cases with this regex:

\\d+[^\\d]+\\d+

That will pass the test if there are a minimum two groups of digits with other characters between them.

Then you can split the address using other regexes to catch 44 in the attribute Digit and 99 in Digit_1. If you haven't used it yet, check out regex101.com or similar to find the correct regex for your needs. Good luck! :)