VPL - similarity always 0 results

Re: VPL - similarity always 0 results

by Juan Carlos Rodríguez-del-Pino -
Number of replies: 3
Picture of Particularly helpful Moodlers Picture of Plugin developers

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


In reply to Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

by 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?
In reply to Garth Brady

Re: VPL - similarity always 0 results

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of 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.

In reply to Juan Carlos Rodríguez-del-Pino

Re: VPL - similarity always 0 results

by Garth Brady -
Hi Juan,

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