Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2013-02-15T05:24:15Z by Jayatheerthan
SystemAdmin
SystemAdmin
603 Posts
ACCEPTED ANSWER

Pinned topic Text analytics- Regular expressions

‏2013-02-11T06:36:47Z |
Hi

i want to extract a view from a file which contains 5 rows of data in which each row contains 5 lines of description, how to write a regular expression to extract there 5 rows of description.

Thanks,
Mahodaya
Updated on 2013-02-15T05:24:15Z at 2013-02-15T05:24:15Z by Jayatheerthan
  • Jayatheerthan
    Jayatheerthan
    20 Posts
    ACCEPTED ANSWER

    Re: Text analytics- Regular expressions

    ‏2013-02-11T07:14:39Z  in response to SystemAdmin
    I am not sure if I understand your question correctly. Could you post the sample data and explain your query in its context?
  • SystemAdmin
    SystemAdmin
    603 Posts
    ACCEPTED ANSWER

    Re: Text analytics- Regular expressions

    ‏2013-02-11T09:24:56Z  in response to SystemAdmin
    Hi

    i have a sample text file which contains the following data

    name Description
    Mahodaya i am from hyderabad, i completed my education in a university
    Latha she is new to text analytics in ibm biginsights
    Mahi she started learning the bigdata course from online tutorials

    i am storing all descriptions in a Description.dict file and writing below code

    create dictionary DescriptionDict
    from file 'Description.dict';

    create view Description as
    extract dictionary 'DescriptionDict'
    on R.text as match
    from Document R;

    output view Description;

    now i am getting all the descriptions but i dont want to use dict file i want to use a regular expression which meets above all descriptions, can u please tell me how to do it.
  • SystemAdmin
    SystemAdmin
    603 Posts
    ACCEPTED ANSWER

    Re: Text analytics- Regular expressions

    ‏2013-02-11T09:26:59Z  in response to SystemAdmin
    Hi

    i have a sample text file which contains the following data

    name Description
    Mahodaya i am from hyderabad, i completed my education in a university
    Latha she is new to text analytics in ibm biginsights
    Mahi she started learning the bigdata course from online tutorials

    i am storing all descriptions in a Description.dict file and writing below code

    create dictionary DescriptionDict
    from file 'Description.dict';

    create view Description as
    extract dictionary 'DescriptionDict'
    on R.text as match
    from Document R;

    output view Description;

    now i am getting all the descriptions but i dont want to use dict file i want to use a regular expression which meets above all descriptions, can u please tell me how to do it.
  • SystemAdmin
    SystemAdmin
    603 Posts
    ACCEPTED ANSWER

    Re: Text analytics- Regular expressions

    ‏2013-02-11T09:27:00Z  in response to SystemAdmin
    Hi

    i have a sample text file which contains the following data

    name Description
    Mahodaya i am from hyderabad, i completed my education in a university
    Latha she is new to text analytics in ibm biginsights
    Mahi she started learning the bigdata course from online tutorials

    i am storing all descriptions in a Description.dict file and writing below code

    create dictionary DescriptionDict
    from file 'Description.dict';

    create view Description as
    extract dictionary 'DescriptionDict'
    on R.text as match
    from Document R;

    output view Description;

    now i am getting all the descriptions but i dont want to use dict file i want to use a regular expression which meets above all descriptions, can u please tell me how to do it.