Identify frequent words and phrases in a field

ewarthur

New member
Local time
Today, 07:39
Joined
May 13, 2012
Messages
5
Hello,

I have a database in Access 2007 which contains a field called PO Line Item data. I am looking to identify which are the most frequent words and phrases (perhaps up to 4 or 5 words in length) as well as a frequency count. I would like access to create another table to record this information.

How can I write this query? I have only intermediate knowledge of access and none in VBA.

Thanks for your help.
 
Hello Pat,

Thanks for replying. I'm not sure where to start with VBA, especially if the VBA code cannot be called from a query.
 
Hello again Pat,


I found this code below which has helped. I can run through each word and add this to a table. I will then need to work out how I can grab 1 or 2 words from the keyword I have identified to make up a 3 word phrase.

Thanks again.

Function SelectWords(InString As String, InCount As Integer) As String
'-- Return a string with InCount words from the InString supplied separated by one space as a delimiter
Dim MyArray() As String
Dim x As Integer
SelectWords = "" '-- Initialize the return value
If Len(InString) > 0 Then
MyArray = Split(InString, " ")
If InCount > UBound(MyArray) Then
'-- Limit the InCount to Max UBound of the Array
InCount = UBound(MyArray)
End If
If (UBound(MyArray) > 0) And (InCount > 0) Then '-- We have some array elements
For x = 0 To InCount - 1
SelectWords = Trim(MyArray(x)) & " "
Next
'-- Strip off the last space
SelectWords = Left(SelectWords, Len(SelectWords) - 1)
End If
End If
End Function
 
Unfortunately I don't know how to get 2 or 3 word phrases. Does anyone know how I could do this in SQL?
 
out of interest, where does this datra come from

ideally this po line description would be in a "products" table, and all you would store in the order (orderline) table would be the product id.

analysing the product file is a different thing. you could add any number of attribute fields to determine the type of product you have.

this sort of approach is bound to be better than a textual analysis, surely.
 
Hello again,

I did a google search on "text analysis with Microsoft Access" and found a great Access database which has solved my problem. Please see:



funsci.com/fun3_en/lexicon/handbook.htm



for a downloadable database and description of how this works.

Thanks to all for your advice. For me this post is solved.
 

Users who are viewing this thread

Back
Top Bottom