VPL - similarity always 0 results

Re: VPL - similarity always 0 results

Garth Brady -
回帖数:4
The students are using php... It's worked in the past but unfortunately that does not seem to be on the list 伤心 Can I add it somehow?
回复Garth Brady

Re: VPL - similarity always 0 results

Juan Carlos Rodríguez-del-Pino -
Particularly helpful Moodlers的头像 Plugin developers的头像

Dear Garth.
I have added "Support of PHP similarity search" on the TODO list.
Best regards,
Juan Carlos.


回复Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

Garth Brady -
It's strange because the Similarity function used to work for php but it doesn't any longer. Is this a file I can tweak myself? It looks like I just need to create tokenizer_php.php and similarity_php.php files... If I use cpp as a model, is this likely to work?
回复Garth Brady

Re: VPL - similarity always 0 results

Juan Carlos Rodríguez-del-Pino -
Particularly helpful Moodlers的头像 Plugin developers的头像

Dear Garth,
to use the C++ parser with php files you only need to modify the similarity/similarity_factory_class.php adding the key/value 'php' => 'cpp' to the $sstr array.

Please,  Let me know if its worth to use in the official VPL version.

Best regards and apologies for the delayed answer.
Juan Carlos.

回复Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

Garth Brady -
Hi Juan,

Yes, that worked flawlessly! Thank you so much! It's such a useful tool! Again, very much appreciated!