Feature #1611

RCP: AbbreviationsAndLines Macro

Added by Matthieu Decorde about 8 years ago. Updated almost 8 years ago.

Status:Feedback Start date:12/09/2015
Priority:Normal Due date:
Assignee:- % Done:

90%

Category:Macros Spent time: -
Target version:TXM - Oriflamms 2.0

Description

EN: This Macro lists and counts words, characters and abbreviations in text lines with distinction of 3 zones (beginning, middle and end of line) based on 2 distances:
  • distance from line start
  • distance from line end
FR: Macro qui effectue un certain nombre de dénombrement de mots, caractères, abréviations dans les lignes en spécifiant 3 zones dans une ligne à l'aide de 2 distances :
  • distance au début de ligne
  • distance à la fin de ligne

History

#1 Updated by Matthieu Decorde about 8 years ago

  • Category changed from SWB to Macros

#2 Updated by Alexey Lavrentev about 8 years ago

  • Subject changed from RCP: Macro AbreviationsEtLignes to RCP: AbbreviationsAndLines Macro
  • Description updated (diff)

#3 Updated by Matthieu Decorde almost 8 years ago

  • % Done changed from 0 to 50

#4 Updated by Matthieu Decorde almost 8 years ago

  • Target version changed from TXM - Oriflamms 1.0 to TXM - Oriflamms 2.0

#5 Updated by Alexey Lavrentev almost 8 years ago

  • Status changed from New to Feedback

Dans le tableau tsv produit par la macro les chiffres dans la colonne %=NcharAbbr/Ntotal sont exprimés en pourcentage pour les débuts et milieu de ligne (line_part=s|m) et en fraction pour les fins de ligne (line_part=e).

Solution : multiplier par 100 les valeurs de la colonne %=NcharAbbr/Ntotal

#6 Updated by Alexey Lavrentev almost 8 years ago

  • % Done changed from 50 to 90

Done : remplacé
writer.println "$text_id\t$pb_id\t$cb_id\t$lb_id\te\t$Nabbr\t$NsupAbbr\t$Ntotal\t"+((float)NsupAbbr/(float)Ntotal);
par
writer.println "$text_id\t$pb_id\t$cb_id\t$lb_id\te\t$Nabbr\t$NsupAbbr\t$Ntotal\t"+(100.0*(float)NsupAbbr/(float)Ntotal);
(AbbreviationsAndLinesMacro.groovy, ligne 172)

Also available in: Atom PDF