Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given following google drive to download required materials: https://drive.google.com/drive/folders/1jFfNHrKK3tVxGDsy553Qj7eqA3NZ8v4i?usp=sharing How to solve following problem? Indexing: write a Python script index.py that take an input directory

Given following google drive to download required materials:

https://drive.google.com/drive/folders/1jFfNHrKK3tVxGDsy553Qj7eqA3NZ8v4i?usp=sharing

How to solve following problem?

image text in transcribed
Indexing: write a Python script "index.py" that take an "input" directory with a collection of XML documents, then output an index file also in XML format. The index should contain for each token, the token's value, and all of this token's provenance. 'which' tag should include the name of the XML file that has the token, and "where' tag should include the path to find the token in relevant file. You can assume values are tokenized by white spaces and punctuation characters. For example: yarn.nodemanager.aux-services' can be tokenized to ['yarn', 'nodemanager', 'aux', 'services"]. (You don't need to consider about numbers like '1.0'.) Execution format: Python index.py input index.xml Example of output file: yarn mapred-site. xml configuration. property . value capacity-scheduler. xml configuration. property . name capacity-scheduler. xml configuration . property . value yarn-site. xml configuration. property . name >

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions