Advertisement

02.28.2008 at 09:19AM PST, ID: 23201037
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Follow up to another question - how to extract keyword list from text

Hi I posted a question yesterday and assigned points before realizing that there was an issue with the results.  The question is here:
http://www.experts-exchange.com/Programming/Languages/Scripting/Perl/Q_23198749.html

To restate what I am trying to do here are 2 sample lines of text
Sample 2 lines in the text file (one of about 60000 lines, each of which will be parsed) each one represents a "record":
Line 1) AN 0000001--DT Jnl Article--MT Print^PDF--AU Smith, T.E.--PA JAW--TI The Life and Times of Dr. Water--DE Water Quality^Training^Coliforms^Water Industry--AB Overall it blah blah blah
Line 2) AN 0000002--DT Jnl Article--MT Print--AU Smith, T.E.--PA STA--TI Water Conservation in Africa--DE Water Quality^Conservation^Water Industry^Africa--AB There is an abstract here
Line 3) .... etc.

What I need to do is
1) find all records that have PA JAW or PA ST(A|B|C|D|E|F|G)
2) Create an alphabetical list of the terms used in the "DE Water Quality^Training^Coliforms^Water Industry"
So it will cycle through each line and would not repeat any particular term used again in the list

So in the above record after reading line 1 the list would be
Coliforms
Training
Water Industry
Water Quality

After the second line it would be
Africa
Coliforms
Conservation
Training
Water Industry
Water Quality

3) The -- are actually \x1e but EE wouldn't display it when I copied and pasted it

*** 4) This is where the catch is that I didn't know yesterday.  Some of the Descriptors may have a \x1e in it - for example here is one example
"DE Water Quality^Distribution Systems^Metering^Zurich, \x1eSwitzerland^Associations^Memberships^Association    \x1e    Management^Strategic Planning\x1eAB Abstract here"

So in the output it made
Association
Management
Switzerland
Zurich,

That is basically what I need to fix in the output.  Also there may be extra whitespace surrounding the \x1e so it needs to parse it together as a single space.

The solution I originally accepted was:
while( <> ){
  @key{split/\^/,$1}=() if /\x1e(PA JAW|PA ST[A-G])\x1e/ && /\x1eDE\s*([^\x1e]*)/;
}
$\=$/;
print for sort keys %key;

Unfortunately I don't understand it well enough to figure out how to modify it.  
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: PurpleSlade
Solution Provided By: Adam314
Participating Experts: 1
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
02.28.2008 at 10:09AM PST, ID: 21006427

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.28.2008 at 10:22AM PST, ID: 21006547

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.28.2008 at 10:43AM PST, ID: 21006778

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.28.2008 at 10:47AM PST, ID: 21006820

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.28.2008 at 03:28PM PST, ID: 21009343

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.06.2008 at 10:18AM PST, ID: 21063139

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
03.06.2008 at 10:32AM PST, ID: 21063246

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628