+ Reply to Thread
Results 1 to 5 of 5

Extracting data from a sentence.

  1. #1
    Registered User
    Join Date
    07-02-2014
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    33

    Extracting data from a sentence.

    What's up all-stars,

    My client is a repair service who has a poorly constructed database when it comes to data trending (lots of free text fields). While I'm working with them on normalizing their data, they want to be able to do trending on their years of previous sentence-format information. Does anyone know how to do part-of-speech tagging and grammatical parsing in excel or can anyone otherwise point me in the right direction?

    For example, these sentences
    Please Login or Register  to view this content.
    would all yield the same data:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,646

    Re: Extracting data from a sentence.

    Can you give more other PARTS and more FAILURE MODE that may occurred during previous years?
    Quang PT

  3. #3
    Registered User
    Join Date
    07-02-2014
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    33

    Re: Extracting data from a sentence.

    Sure can. See the attached excel file.

    I tried out the SMILE Text Analyzer and got the following part-of-speech tagged output for my example sentences:

    Please Login or Register  to view this content.
    Here is the key of what each part-of-speech means:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Extracting data from a sentence.

    Hi IcyBricks,

    Does anyone know how to do part-of-speech tagging and grammatical parsing in excel or can anyone otherwise point me in the right direction?
    I'm not a word person, so I took a slightly different approach. I looked at KEYWORDS in an attempt to match 'Part Names', and 'Failure Modes' for the 'Part Names'.

    Algorithm used:
    a. Copy the 'RawData' Sheet Contents to the 'Scratch' Sheet ('Data Area').
    Column 'A' contains a sentence to be processed on each line (.e.g. 'The 150pf capacitor was leaking.').
    b. Create a Dictionary (list) of unique 'Part Names' from the sheet containing the MASTER 'Part Name' list.
    c. Remove extraneous words (.e.g. 'the') and remove punctuation from the 'Data Area'.
    There is a list of extraneous words and extraneous symbols on the sheet containing the MASTER 'Useless Items' list.
    d. Replace abbreviations (and other items) in the 'Data Area' with synonyms (e.g. replace 'cap' with 'capacitor').
    Some words are manipulated to be able to match 'Part Name' or 'Failure Mode' keywords (e.g. 'power cord' becomes 'Power Cord/Converter').
    There is a list of synonyms on the sheet containing the MASTER 'Synonym' list.
    e. Process One Raw Data sentence (one per line) at a time.
    (1) Find a matching 'Part Name'.
    (2) Get potential 'Failure Mode' Text for that Part Name.
    (3) STOP with a MATCH, If the 'Failure Mode' Text is contained VERBATIM in the 'Raw Data' Sentence.
    (4) STOP with a MATCH, If all the 'Failure Mode' Text WORDS are contained in the 'Raw Data' Sentence.
    (5) Count the number of 'Failure Mode' Text WORDS contained in the 'Raw Data' Sentence.
    (6) Repeat steps (2) thru (5) until a MATCH has been found, or there is no more 'Failure Mode' Text for the Part Name.
    (7) Declare a MATCH for the 'Failure Mode' Text that contains the MOST words in the 'Raw Data' Sentence.

    Lewis

    See the attached file and code that follows and is continued in the next post:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by LJMetzger; 02-21-2015 at 02:58 PM.

  5. #5
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Extracting data from a sentence.

    Code for previous post part 2:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extracting data from file in directory and extracting filename
    By brad999 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2014, 11:21 AM
  2. Extracting value from sentence
    By MEMEs in forum Excel General
    Replies: 2
    Last Post: 07-06-2010, 10:10 AM
  3. Extracting a number out of a sentence
    By Geomarsh in forum Excel General
    Replies: 17
    Last Post: 08-12-2009, 09:47 PM
  4. Excel 2007 : pulling data from a sentence
    By shaun.murray in forum Excel General
    Replies: 1
    Last Post: 01-27-2009, 11:23 AM
  5. Extracting a Word from a cell that contains a sentence
    By onuwayhid in forum Excel General
    Replies: 1
    Last Post: 02-07-2008, 12:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1