Rev 6803 | Rev 6808 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6803 | Rev 6804 | ||
---|---|---|---|
Line 285... | Line 285... | ||
285 | translated module (1002 resp 2004). --> HELP there is no A.cn file!! |
285 | translated module (1002 resp 2004). --> HELP there is no A.cn file!! |
286 | 286 | ||
287 | The files A.en contains the following lines related to this module. |
287 | The files A.en contains the following lines related to this module. |
288 | 288 | ||
289 | ?? (...?2 is the ranking, why do we sometimes have ....?4 ) |
289 | ?? (...?2 is the ranking, why do we sometimes have ....?4 ) |
290 | (ER : |
290 | (ER : It is a weight -- see name of variable in modind.c -- giving more importance to the title words : 4 if the word appears in the module title, 2 otherwise) |
291 | in modind.c, the variable containing this number is called weight, probably to |
- | |
292 | indicate that 4 means a more important keyword than 2) |
- | |
293 | 291 | ||
294 | 2d:1003?2 from description and description_it |
292 | 2d:1003?2 from description and description_it |
295 | algebra:1003?2 from domain |
293 | algebra:1003?2 from domain |
296 | bersaglio:1003?2 from keywords_it |
294 | bersaglio:1003?2 from keywords_it |
297 | click:1003?2 from description |
295 | click:1003?2 from description |
Line 428... | Line 426... | ||
428 | - modind.c creates files A.$lang etc which are based on words of keywords, |
426 | - modind.c creates files A.$lang etc which are based on words of keywords, |
429 | title, description. They are not all of them in the "completion list" |
427 | title, description. They are not all of them in the "completion list" |
430 | but can be written and found by the search engine. |
428 | but can be written and found by the search engine. |
431 | 429 | ||
432 | 430 | ||
- | 431 | ||
- | 432 | Technical things about modind.c (ER. just to avoid forgetting work in progress) |
|
- | 433 | =============================== |
|
- | 434 | ||
- | 435 | The tasks done are in order : |
|
- | 436 | ||
- | 437 | - prep() : * replaces if possible the default language list (defined at top of file) |
|
- | 438 | by the list of languages installed on the server. |
|
- | 439 | * gets the list of all modules prepared by a previous script |
|
- | 440 | * opens files bases/site2/author|description|language|... |
|
- | 441 | ||
- | 442 | - modules() : for each language{for each module{extract information}}. |
|
- | 443 | ||
- | 444 | - clean() : closes files bases/site2/author|description|language|... |
|
- | 445 | ||
- | 446 | - sprep(),sheets() : idem for sheets. |
|
- | 447 | ||
- | 448 | ||
- | 449 | ||
- | 450 | Extracting information from one module for a given language (function onemodule) : |
|
- | 451 | ||
- | 452 | - write author,description,language,etc. information in each corresponding file |
|
- | 453 | bases/site2/author|description|language|... |
|
- | 454 | ||
- | 455 | - normalizes data (suppress uppercase, accents, apostrophe, plural) |
|
- | 456 | according to dictionary, to get normalized author,description, title, etc. |
|
- | 457 | This is done in the loop for(i=0;i<trcnt;i++){...} |
|
- | 458 | ||
- | 459 | - transforms the (normalized) title into words (change commas to spaces) |
|
- | 460 | and for each word, appends it with weight 4 using function appenditem. |
|
- | 461 | the variables are the word itself, the current language treated, the serial number of module, |
|
- | 462 | the weight=4, and the module language. |
|
- | 463 | ||
- | 464 | - put every information other than title (description, keywords, foreign titles, author...) |
|
- | 465 | in a buffer, transforms it into words and appends this as above except than weight=2. |
|
- | 466 | ||
- | 467 | BUG ? : in this process, i_keywords_fr is used twice, probably the first one should be i_keywords_en, to be checked. |
|
- | 468 | ||
- | 469 | - the 2 preceeding points (treatment of title and other info) are repeated with the difference |
|
- | 470 | that the transformation into words is replaced by a translation : |
|
- | 471 | the commas are kept, but some usual words are deleted. |
|
- | 472 | BUG ? : Another difference is that part of "other information than title" is missing, |
|
- | 473 | for instance the foreign titles, require, author. |
|
- | 474 | ||
- | 475 | ER : I don't know why the process is repeated : should look at appenditem to see where it is appended, maybe the second time is somewhere else. |
|
- | 476 | ||
- | 477 | ||
- | 478 | =============================== |