i want to know how we create files with extensions .ini and how manipulating them in a program?
my exact prroblem is that in my application i have to acess to a lot of files with .txt and i want to stock these the paths of these files in another file .ini? i need your help
am implementing a program in indexing semi structured documents I found a lot of difficulties. First, am wondering if one has an idea how to start.
That's an overly-broad problem statement. The place to start is to clearly and precisely list the requirements. What are the inputs? How is the document structure constrained? What are the desired outputs? What are the rules for transforming the inputs into the outputs?
In other words, what are the preconditions and what are the post-conditions?
the input is an XML documents which they exist in a directory all these documents pass by an indexing treatment(tokenization, eliminating the stop words, and translate the rest of the terms in their roots using a file of origins-terms).the output is an inverse file "a structure contains the significant terms, the weight of each term and in the document where this term is appear"
This is good. You've gone from the 20,000m level to the 10,000m level.
You clearly have 4 domain objects: a directory of input files, the input file, a file of origins-terms, and an output file.
You need to get to the 5,000m level by clearly defining the XML schema of the input files, the format of the origins-term file, and the format (or XML schema) of the output file.
You then need to clearly define the rules for splitting the text (even if it seems quite obvious), how match terms, what to do with words that do not match, how to represent terms that have multiple matches.
Then to get to the 1,000m level, you need to define the user interface. How do you handle errors such as I/O errors or file permission errors? What do you do with files that cannot be parsed because they are ill-formed? Are there thresholds for files that have a low match rate or a high match rate?
After that you need to see if you have all of the tools needed to parse the input, match the data and write the output, or if you need to create your own low-level libraries and tools.
You need to understand the requirements a level low enough so that how to write the code is almost an afterthought. When you get down to programming, all you should need to think about is what are the right data structures and algorithms to apply to the problem.
Finally, it would be good to have an agreed upon set of test data (input and output) to validate the implementation.