Feature #3373

Macro, Corpus, sample texts to n first words

Added by Matthieu Decorde 5 months ago. Updated 5 months ago.

Status:New Start date:03/14/2023
Priority:Normal Due date:
Assignee:- % Done:

80%

Category:Corpus Spent time: -
Target version:TXM 0.8.3

Description

Help to sample a corpus at:

a)
  • import
    • cut texts at n first words after tokenization
      • add 'Sampling/├ëchantillonnage' section in import parameters form
      • add 'Sample texts to [ ] first words' parameter
      • add 'Cut at sentence boundaries (inclusive)' option parameter

or

b)
  • update
    • add new corpus command 'Sample texts at n first words' (on XML-TXM pivot)
      • add 'Number of words' parameter
      • add 'Cut at sentence boundaries (inclusive)' option parameter
      • update corpus

or

c)
  • update
    • add new corpus command 'Sample texts from sub-corpus' (on XML-TXM pivot from sub-corpus matches)
      • for example with sub-corpus built with query <text> []{1,10000} and MatchingStrategy set at 'longest'
      • update corpus

Solution

Create the corpus/TruncateTextsAtFirstWords macro to sample the xml-txm files of a TXM corpus with one parameter : number of words to keep per text

History

#1 Updated by Serge Heiden 5 months ago

  • Description updated (diff)

Also available in: Atom PDF