Generating text from language statistics

Hi :)
I'm working on an application that analyzes text in a String and stores the number of occurences of 3-character combinations. So it reads the first 3 chars in the string, and puts them in a HashMap as key, and sets the value to 1. It then moves 1 char forward and does the same. If it's the same combo, the value is set to 2; if it's a new combination of chars, it puts them in as a second key and sets value to 1. This I know how to do....
But now I need the program to use those statistics to generate a completely new text of user-chosen length. So if the text in the string was in english/german/swedish or whatever, it's supposed to generate text that is very similar to that language; based on how often different combinations of letters occur in that specific language.
Anybody have any good ideas as to how I can accomplish this?
Thanks :)

there are a bunch of alternate TC Generator / Reader filters available that show more than the built in plugs. here's a couple to start you off
http://www.1z1.at/plugins/#displaysourcetc
http://web.mac.com/piero.fiorani/PieroFFCE_Effect/FCE_TimecodeDisplay.html
and the one that will actually do all you want but is a 2 step process (and a commercial plug in)
http://www.spherico.com/filmtools/tcrPlus/index.html

Similar Messages

  • Need to change auto generated text from pdf report

    I have implemented pdf but it generated text from the autogenrated xml.
    If I need to change that text then what should I want to do for that?
    Following is my xsl file and the generated output in pdf.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration = "yes" />
    <xsl:template match="/">
    <fo:root>
    <fo:layout-master-set>
    <fo:simple-page-master master-name="my-page">
    <fo:region-body margin="1in"/>
    <fo:region-before extent="1in" background-color="silver" />
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="my-page">
         <fo:static-content flow-name="xsl-region-before">
    <fo:block height="150px" width="1024px" background-color="blue" >
    <fo:external-graphic width="340px" src="http://localhost:9000/web-determinations9000/images/logo.png"/>
    </fo:block>
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
    <fo:block >
    <xsl:apply-templates mode="dump" select="/session/entity/instance/attribute"/>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    output from pdf -
    What is Student Id?=
    65.0
    Is scored more than 80% true%=
    true
    What is Student Name?=
    asf
    What is lastname?=
    asdf
    Is student eligible for gold medal?=
    true
    If i want "what is student id?" text to only student Id then what change I need for that?

    Hi,
    Following is the code sample for your understanding:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:fn="http://www.w3.org/2005/xpath-functions">
    <xsl:output method="xml" indent="yes" encoding="utf-8" omit-xml-declaration = "yes" />
    <xsl:template match="/">
    <fo:root>
    <fo:layout-master-set>
         <fo:simple-page-master master-name="my-page">
              <fo:region-body margin="1in"/>
              <fo:region-before extent="1in" background-color="silver" />
         </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="my-page">
         <fo:static-content flow-name="xsl-region-before">
              <fo:block height="150px" width="1024px" background-color="blue" >
              <fo:external-graphic width="340px" src="http://localhost:9000/web-determinations9000/images/logo.png"/>
              </fo:block>
         </fo:static-content>
         <fo:flow flow-name="xsl-region-body">
              <fo:block>
              <xsl:apply-templates mode="dump" select="/session/entity[@name='global']/instance[@label='global']"/>
              </fo:block>
         </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    <xsl:template match="/session/entity[@name='global']/instance[@label='global']" mode="dump" priority="100">
         <fo:block margin-top=".5cm" margin-left=".1cm" border-start-style="solid">
              Student ID:<xsl:value-of select="attribute[@id='var_student_id']/number-val"/>
         </fo:block>
    </xsl:template>
    </xsl:stylesheet>Thanks,
    Aakarsh

  • Generate text from the effect controls

    Is it possible to generate text from a textfield (or something similar) from the effect controls?
    I have an Adjustment Layer with a custom effect on it with a Slider, two Color pickers and four Checkboxes.
    Can I somehow add a textfield that the user can input text in, and then link this to a text layer in the composition?
    The reason I want this, is because the user can add all the information in one effect, instead of having multiple text layers to edit.
    I don't think there is a textbox for this, but is there anpther way? Let's say I add an effect that has a dynamic name, that I can link up to the source text of my textlayers in the composition.
    Any help would be much appreciated
    Eirik

    Thank you for fast reply!:)
    Ok, then I guess it can't be done, not the way I hoped anyway.
    This is the effect I have made. I have linked the properties to other layers.
    What I wanted was an input field where the user inputs for example "My Title". The source text of my text field in the composition would then update to "My Title".
    I know I could probably do this by code, but then the original point kinda disappears. It should be easy for the user to adjust the settings under one effect, instead of having to adjust it multiple places.
    I guess the user have to edit the textfield in the comp by actually going into the layer (doubleclick it/highlight it with the text tool etc.) unless you have a genius workaround? (Please say you do:P)
    Eirik

  • How do you remove or change auto generated text in returned form e-mails?

    Hello,
    I am currently using Adobe Acrobat 8 Professional (Version 8.1.3) to create a form that will be sent to a group of people.  When testing it, I've noticed that when the end user presses the "SUBMIT FORM" button and a new e-mail opens with the completed form attached, the following text is automatically added to the body of the e-mail:
    Form Returned: XXXXXXX.pdf
    Instructions to add this form to a data set:
    1. Double-click the attachment.
    2. Acrobat will prompt you to select a data set.
    What I need to know is whether or not there is a way to either prevent this auto generated text from appearing or revise it so it gives a custom message instead.
    Any insight would be greatly appreciated!
    Regards,
    Jeff

    It sounds like you are getting a basic message that is telling you submitting the PDF is unnecessary and asking if you want to submit the data instead. I have not seen this one before, but that is my guess. If you are using the form fields created in Acrobat (not Designer), then just select FDF or XML for the data type to be submitted, not the form.

  • I have been unable to print from FF to Brother HL-1440. print generate pages w/odd bits of text from the page, and sometimes one image. If I want to print off the web, I have to print PDF. Older versions of FF print fine.

    I have been unable to print from FF to Brother HL-1440. print generate pages w/odd bits of text from the page, and sometimes one image. If I want to print off the web, I have to print PDF. Older versions of FF print fine.

    I downloaded OpenOffice and am able to print documents (in particular, the same document I created in MS Word). I guess MS Word is to blame. I believe the issue is concluded, but I'd welcome any comments about the Active Directory, as I might have a problem
    with OpenOffice in the future regarding that.

  • Generating TEXT output from RTF template/reports

    Hi ,
    We have been working with XML Publisher for a long time now.. and we have come across some requirements such as
    1. Page break in TXT report output
    2. Page Headers after every 'X' lines in TEXT output.
    This was easily achieved with RTF template and PDF/HTML/RTF output, but not with TEXT output in eTEXT template.
    So we started looking into two approaches
    1. Generate TXT from PDF/RTF/HTML output(generated from RTF template), though it will addon to the time, but we are looking for this approach. We are looking for some JAVA api's which can help us to extract text from PDF/HTML/RTF while preserving the format.
    2. Pass the TXT generated by eTEXT template to our custom util , which will split the report in diff. pages.This will get complex as we recieve more and more reports.
    We have also tried hacking the RTF parser used in XML P so as to get a TXT output or using XSL-FO objects in eTEXT parser, but we could not get anything of our help.
    Does anyone have any pointers in this.
    regards
    Gaurav

    You can burst with eText and I have done it
    successfully.
    I don't believe pagebreaks are an option in eText and
    I don't think it makes sense either since your
    generating a flat-file and not a customer or internal
    facing document. Does that make sense?
    Also, if you would like you can use the
    BIPublisherIDE, this code can be converted pretty
    easily to handle jcp. There is a an oa framework
    version I have developed but I haven't posted on my
    blog yet. I plan on adding a bolt on for java
    concurrent programs soon. it's really pretty simple
    just haven't had the time.
    http://bipublisher.blogspot.com/2008/03/bi-publisher-b
    ipublisheride.html
    Ike Wiggins
    http://bipublisher.blogspot.com
    Thanks Ike for your reply.
    I agree with your points on TXT files, but in our case,the reports are generated in TXT format for the customer so we are looking for the above mentioned features.
    I have gone through BIP IDE and its a wonderful small utility which eases the task of BIP development.
    As I mentioned in my original post that we are currently processing the generated TXT report using a custom util. in JAVA to get the desired output in TXT again.
    I assume thats not what a JCP would do,so I am looking to explore that too.
    As I understand the process for report generation is
    1. Generate XSL from eTEXT template.
    2. Get the XML data from DB using XDO
    3. Apply XSL on XML to get the required template.
    If we are looking to achieve some customizations then we need to have the XSL generated with those customizations.
    In this case, where do we plug in the JCP to alter XSL or am I missing something.
    regards
    Gaurav

  • FM to convert any text from one language to other

    Hi Experts,
    1) Is there any function module to convert text from one language to other???
    2) Is there any function module to check whether the language of a text is English or not?
    Thank you.
    Regards,
    Murali

    Hi Karthikeyan,
    We have a requirement where the text contains English and Thai words.
    We have to remove Thai words from this text.
    Any idea how to achieve this......
    Regards,
    Murali

  • Generating email from text

    Hi.
    I have an email represented by a text (with headers, subject, attachement and so on). I would likt to generate a javax.mail.Message from it, so I can extract the headers and attachments more easily.
    I tried to set up a fake Session and a MimeMessage and fill it using a FileDataSource by reading the text from a File, but it didnt work well.
    Anyone know any examples or libraries that could help me here?
    Thanks
    -r

    I found a solution to it. Thought I should post it here, in case someone else have the same problem. It worked making a fake Message, I just invoked some methods that didn't do anything, so I thought it had all gone wrong.
    Imagine your email is stored in a String email :
    InputStream in = new ByteArrayInputStream(email.getBytes());
    MimeMessage mm = new MimeMessage(null, in);We have our message. Way easy...

  • Generate Text File from Goods Receipt (MIGO)

    Hi Expert,
         Please help me ....................
         My company outsource W/H but when I 'm goods receipt or goods issue (MIGO)
         I send slip GR/IR by Fax to W/H but I want generate text file from system to W/H.
         How can I do?
    Thanks.

    Keerthi Hiremath,
           Please .............
           Can you more explain what is medium of 8 (special function) and other ?
    Thanks.

  • How to remove the automatically generated text fields from the InfoSet

    I followed the procedure by SAP help.
    Automatically generated text fields are marked with a 'T' on the icon in the InfoSet. You can remove the automatically generated text fields from the InfoSet in the initial screen of the InfoSet maintenance under Further Functions -> Delete Text Fields. Cancel the DataSource creation on the next screen and delete the text fields in the InfoSet maintenance transaction.
    I know that there is an option "No automatic text recognition" when I create a new InfoSet, however, I couldn't find out how to change an existed InfoSet. I checked menu Goto->Global Properties, but that option is disabled. Is there a way to remove text fields from an existed InfoSet?

    Hi,
    In the initial screen (when you enter transaction code SQ02) type your infoset name and goto menu: Infoset -> More functions -> Delete text fields. this will delete all text fields.
    I hope this helps to resolve the issue.
    Ram

  • Generating Text files from PL/SQL

    To generate Text files from PL/SQL on SERVER, i can use UTL_FILE
    package, but how do i create text files on client ( i.e., on the
    C: drive ) by executing anonymous PL/SQL blocks.
    Thanks in advance.

    You can use DBMS_OUTPUT to display stuff to the screen and the
    SQL*Plus SPOOL command to write screen output to a file on your
    local drive.
    magic!
    APC

  • CPU usage while generating text output from reports

    hi
    while we attempt to generate the text (delimited) output from reports and when the query fetches more than 1500 rows, the cpu usage stays around 100% for long time paralysing the operation...
    we faced the problem when we attempted to generate text output for around 10000 records.
    any suggestions?
    ravi kumar chandran

    You can burst with eText and I have done it
    successfully.
    I don't believe pagebreaks are an option in eText and
    I don't think it makes sense either since your
    generating a flat-file and not a customer or internal
    facing document. Does that make sense?
    Also, if you would like you can use the
    BIPublisherIDE, this code can be converted pretty
    easily to handle jcp. There is a an oa framework
    version I have developed but I haven't posted on my
    blog yet. I plan on adding a bolt on for java
    concurrent programs soon. it's really pretty simple
    just haven't had the time.
    http://bipublisher.blogspot.com/2008/03/bi-publisher-b
    ipublisheride.html
    Ike Wiggins
    http://bipublisher.blogspot.com
    Thanks Ike for your reply.
    I agree with your points on TXT files, but in our case,the reports are generated in TXT format for the customer so we are looking for the above mentioned features.
    I have gone through BIP IDE and its a wonderful small utility which eases the task of BIP development.
    As I mentioned in my original post that we are currently processing the generated TXT report using a custom util. in JAVA to get the desired output in TXT again.
    I assume thats not what a JCP would do,so I am looking to explore that too.
    As I understand the process for report generation is
    1. Generate XSL from eTEXT template.
    2. Get the XML data from DB using XDO
    3. Apply XSL on XML to get the required template.
    If we are looking to achieve some customizations then we need to have the XSL generated with those customizations.
    In this case, where do we plug in the JCP to alter XSL or am I missing something.
    regards
    Gaurav

  • Generating Text file from table using Shell script

    I am using KSH for generating and FTPing a text file from a table.
    While generating Text file I am not getting my Column names in orderly manner.
    q2="select COLUMN1||' '||COLUMN2||' '||COLUMN3 from table1;"
    set pagesize 0
    set head off
    set trimspool on
    set trimout on
    set colsep ' '
    set linesize 1500
    set trimspool on
    spool /ss/app11/oastss/reports/$file2
    select 'COLUMN1'||' '||'COLUMN2'||' '||'COLUMN3' from dual;
    $q2
    spool off;
    EOF
    I am getting the result some what like below in text file
    COLUMN1 COLUMN2 COLUMN3
    MALLIK_ACCT     17-SEP-11     908030482     
    MALLIK_ACCT     17-SEP-11     908266967     
    MALLIK_ACCT     17-SEP-11     909570766     
    I want the format like below
    COLUMN1........ COLUMN2 .... COLUMN3
    MALLIK_ACCT ...17-SEP-11 .... 908030482     
    MALLIK_ACCT ...17-SEP-11 .... 908266967     
    MALLIK_ACCT ...17-SEP-11 .... 909570766
    I put dots(.) for illustration purpose.
    column data length may icrease some times . it shoudl automatically adjust column and data so that they are in alignment. thanks in advance.

    Mallik wrote:
    Hi my question is to format the headers so that they will be in alignment with column data and readable.So you want to output a query as a fixed width format data file? How about this (rather than using scripts)...
    As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /As myuser:
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN v_finaltxt := v_finaltxt||rpad(lower(rec_tab(j).col_name),rec_tab(j).col_max_len,' ');
          WHEN 2 THEN v_finaltxt := v_finaltxt||rpad(lower(rec_tab(j).col_name),rec_tab(j).col_max_len,' ');
          WHEN 12 THEN v_finaltxt := v_finaltxt||rpad(lower(rec_tab(j).col_name),greatest(19,length(rec_tab(j).col_name)),' ');
        END CASE;
      END LOOP;
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := v_finaltxt||rpad(nvl(v_v_val,' '),rec_tab(j).col_max_len,' ');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := v_finaltxt||rpad(nvl(to_char(v_n_val,'fm99999999999999999999999999999999999999'),' '),rec_tab(j).col_max_len,' ');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := v_finaltxt||rpad(nvl(to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),' '),greatest(19,length(rec_tab(j).col_name)),' ');
          END CASE;
        END LOOP;
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;This allows for the header row and the data to be written to seperate files if required.
    e.g.
    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    PL/SQL procedure successfully completed.Output.csv file contains:
    empno                 ename     job      mgr                   hiredate           sal                   comm                  deptno               
    7369                  SMITH     CLERK    7902                  17/12/1980 00:00:00800                                         20                   
    7499                  ALLEN     SALESMAN 7698                  20/02/1981 00:00:001600                  300                   30                   
    7521                  WARD      SALESMAN 7698                  22/02/1981 00:00:001250                  500                   30                   
    7566                  JONES     MANAGER  7839                  02/04/1981 00:00:002975                                        20                   
    7654                  MARTIN    SALESMAN 7698                  28/09/1981 00:00:001250                  1400                  30                   
    7698                  BLAKE     MANAGER  7839                  01/05/1981 00:00:002850                                        30                   
    7782                  CLARK     MANAGER  7839                  09/06/1981 00:00:002450                                        10                   
    7788                  SCOTT     ANALYST  7566                  19/04/1987 00:00:003000                                        20                   
    7839                  KING      PRESIDENT                      17/11/1981 00:00:005000                                        10                   
    7844                  TURNER    SALESMAN 7698                  08/09/1981 00:00:001500                  0                     30                   
    7876                  ADAMS     CLERK    7788                  23/05/1987 00:00:001100                                        20                   
    7900                  JAMES     CLERK    7698                  03/12/1981 00:00:00950                                         30                   
    7902                  FORD      ANALYST  7566                  03/12/1981 00:00:003000                                        20                   
    7934                  MILLER    CLERK    7782                  23/01/1982 00:00:001300                                        10                   
                   The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
    Adapt to output different datatypes and styles are required (this is currently coded for VARCHAR2, NUMBER and DATE)

  • Generate text file from a group above report

    i have problem in generating report in developer 6 report builder my report is master -detail(group above report)
    when i generate text file or csv file then my report is not in group above,master records are repeated along with every detail record.
    is there any solution that i generate group above report in text or csv file
    instead of pdf,rtf,html
    please mail me
    [email protected]

    Can you try adding this in your URL delimited_hdr=NO
    I am not sure it works.
    Just give a try

  • Copying text from PDF files in another language

    When I try to copy text from a PDF file which is written in Greek - the minute I paste it into another document, the text cannot be recognized so comes out as a jumbled mess. How an I solve this problem??

    Into what other document type?  Word?  Do you have a Greek font selected when you paste?  Or a Unicode font?

Maybe you are looking for

  • How to fix Gen6IntelGVAQueryAVDCommandStatus timeout?

    When playing video files, typically m4v type files, using QuickTime, iTunes or VLC and maybe other players, the video freezes for 30 seconds or so while the audio continues.  Then the video plays rapidly until it catches back up with the audio.  When

  • Where can i get the time stamp in Messaging Multiplexor's log?

    i have modify the loglevel to 10,but i can only find the date informatioin in mmp's log like this: 20060317 000000 PopProxyAService.cfg (sid 0xd100c4) USER login which is the "time" stamp and what's it means? i have read the Administration Guide/Refe

  • Update Sales EH before Deleting Delivery EH from application system

    I have placed an enhancement implementation into IF_EX_LE_SHP_DELIVERY_PROC~SAVE_AND_PUBLISH_DOCUMENT I plan on creating an event for an unexpected event called "DeliveryDelete" which will update the Sales Order EH. Should I be using the function mod

  • One Saleorder with '0' qty- No of Invoices

    Hi Gurus, Our Business Scenario like this: we want to create a sales order with '0' qty, and against that sales order i want to create no of invoices(VF01). intiallly i want i want create a sales order without giving any qty, with that that sales ord

  • Attendence Type and Absence Type update

    Hi,   When ABSENCES AND ATTENDENCES  are entered in CAT2 ,  the Infotypes 2001 and 2002 (Aabsence info type and Attendence infotype)  are not gettting updated. Can any one please help me with this.