• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to detect paragraphs composed in English and apply a style

Engaged ,
Aug 01, 2020 Aug 01, 2020

Copy link to clipboard

Copied

In a book (set in Spanish) there are many quotations in English, but only I have a style for quotations (for the moment) and the hyphenation is getting wrong.

 

I would like to ask ID to identify these paragraphs (as some word in English never are in Spanish: for, this, is, etc); a good grep could avoid that a word like for/is could be misinterpreted as the have syllables of Spanish words (alcanfor, sistema)

TOPICS
How to

Views

367

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Aug 03, 2020 Aug 03, 2020

David, yes, it works... but this grep catches just a word in an entire paragraph.

and the idea (sorry) is to detect a larger extension of English words to change the style.

 

Perhaps it is possible to ask (you) that the grep works only in a range of 20+ words, for example?

 

something like this?

“(([^ “]+)\h){21,}(?2)”

(in this case, a nice grep solution by Obi (Voldemort) when it is needed to find quotations of 21+ words.

 

thanks.

 

 

 

 

Votes

Translate

Translate
Enthusiast ,
Aug 02, 2020 Aug 02, 2020

Copy link to clipboard

Copied

Try the following:

 

Find what: \b(?i)(is|for|in|this)\b

Change to: ---leave this field empty---

Change Format: EnglishParagraphStyleName

 

Make sure that the language setting for the paragraph style you use for the English text is set to English (Advanced Character Formats > Language: English: [USA or UK, depending on project requirements]). You'll likely need to add more words to the list in the Find what field to cover all possible quotes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

David, yes, it works... but this grep catches just a word in an entire paragraph.

and the idea (sorry) is to detect a larger extension of English words to change the style.

 

Perhaps it is possible to ask (you) that the grep works only in a range of 20+ words, for example?

 

something like this?

“(([^ “]+)\h){21,}(?2)”

(in this case, a nice grep solution by Obi (Voldemort) when it is needed to find quotations of 21+ words.

 

thanks.

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

If you choose a paragraph style in the Change Format area of the Find/Change dialog, it will apply the style to the entire paragraph.

Screen Shot 2020-08-03 at 2.32.41 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

no. the point is find paragraphs with more than 20 words that presumably are English. Thus the process of assign a new style will be automatic and logical.

 

In a paragraph like this your idea is not a solution. predominantly it is Spanish.

Durante los años 2016 y 2017, se emitieron en el mercado de bonos de Estados Unidos, en las diferentes modalidades señaladas, USD 7.425,0 y USD 7.478,1 billones, respectivamente, que incluyen los bonos emitidos por la Tesorería de Estados Unidos, USD 2.169,4 y USD 2.243,3 billones, respectivamente, y los bonos emitidos por las empresas, USD 1.527,7 y USD 1.646,5 billones, respectivamente. La emisión de bonos que resultan de procesos de titularización de cartera hipotecaria, mortgage related bonds, fue de USD 2.044,2 billones y USD 1.930,7 billones, respectivamente, lo cual muestra la importancia relativa de este segmento del mercado, aun después de la crisis financiera de 2008. Las emisiones de bonos en el mercado de Estados Unidos, durante el año 2018, totalizaron USD 7.311,1 billones, de los cuales el emisor más importante fue la Tesorería, con USD 2.684,6 billones (36,72 %); en segundo lugar, los patrimonios autónomos, constituidos para la titularización de cartera de hipotecaria (mortgage related) con USD 1.870,4 billones (25,58 %).La emisión de bonos corporativos ocupó el tercer lugar, con un monto de USD 1.325,4 billones (18,13 %). Aunque el mercado de bonos corporativos ha crecido en términos absolutos y de participación en el total del mercado, el mercado de la Tesorería sigue siendo de un tamaño mayor en términos absolutos y también en importancia relativa. A 30 de septiembre de 2018, el pasivo consolidado de los denominados non financial corporate business de Estados Unidos ascendía a USD 20.370 billones, de los cuales USD 6.236,0 billones correspondían a bonos; la deuda contratada con establecimientos de crédito solo llegaba a USD 1.096,6 billones, y la deuda hipotecaria a USD 596,4 billones, poniendo de manifiesto la importancia que el financiamiento a través de bonos tiene para las empresas.

 

that is the reason I provided a grep mechanism to do it (Obi's grep).

How to implement it? Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

LATEST

Dear mr Popham:

 

unfortunately, time is finished.

also, this thread seem agonizing..

 

fortunately, Obi's superb grep (quoted above) was THE solution.

Screen Shot 2020-08-03 at 7.35.38 PM.png

 

Manually, pieces of that required text were selected. And styled,

Anyway, thanks for your time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines