RandomSentence

RandomSentence

Generates a text based on a pseudo text grammar. The length of the string is varied with a random from min to max. The output of the pseudo text grammar is truncated at the selected length.

Attributes
Name Description Required Min Max Allowed Values
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
Nodes
Name Description Required Min Max Allowed Values
unique Generates random number in specified range but picks them uniquely. This requires the specified range (max-min+1) to be greater then the number of rows/ID's of the parent table. E.g. with a table size of 100 rows the range must be >=100 e.g.: min=1000, max=2000 no 0 1
  • true
  • false
  • 0
  • 1
max Content type: Integer
Maximum string length to generate (inclusive)
yes 1 1
distribution Distribution to be used by a generator when calculating a value no 0 1
  • bankmark.pdgf.distribution.Logarithmic
  • bankmark.pdgf.distribution.Beta
  • bankmark.pdgf.distribution.Normal
  • bankmark.pdgf.distribution.Exponential
  • bankmark.pdgf.distribution.Zeta
  • bankmark.pdgf.distribution.Binomial
min Content type: Integer
Minimum string length to generate (inclusive)
yes 1 1
distinct Content type: Long
Number of distinct values (< 1 = deactivated) being generated.
Example:
<min>1</min>
<max>10</max>
<distinct>3</distinct>
will only generate only the three distinct values within the given interval e.g.: 3, 5 and 10 as result.
Default: 0
no 0 1
Sub-Parameters
Parent Name Description Required Min Max Allowed Values
min gen Value Generator for this field no 0 1
max gen Value Generator for this field no 0 1
distinct gen Value Generator for this field no 0 1

Example

  1. Random Sentence

    Generates a random sentence with at least 7 and at most 150 characters.

    Schema config for Random Sentence
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="RANDOM_SENTENCE">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Random Sentence-->
          <!--Generates a random sentence with at least 7 and at most 150 characters.-->
          <field name="random_sentence" size="" type="NUMERIC">
            <gen_RandomSentence>
              <min>7</min>
              <max>150</max>
            </gen_RandomSentence>
          </field>
          </table>
    </schema>
    
    Output for Random Sentence
    brave Tiresias' need to sublate carefully-- idle multipliers integrate without the idle careful instructions. always regular patterns by the bo
    furious warthogs run busily always dogged waters? busy platelets snooze under the idle gifts? dogged Tiresias' wake never from the enticing tithes; d
    decoys should promise evenly up the permanently ruthless escapades; sly hockey players above the bol
    regular waters need to are. epitaphs cajole slowly over the perma
    ironic quick waters x-ray without the fluffy somas. busily ironic asymptotes haggle of the daring fret
    stealthy idle frays could have to print thinly at the carefully silent orbits? blithely bold warthogs beneath the
    final depths against the ideas breach ruthless thin Tiresias'-- blit
    quiet quiet asymptotes engage ironically sly theodolites! waters behind the close patterns doze regularly ironic warhorses? bravely permanent asymp
    daringly furious pearls will doze slyly regular epitaphs; regularly ironic realms nag? dependencies over the fluffily even platelets
    even foxes after the braids should nag evenly somas-- idly
2.7-83fb0 | 2020-04-22