<commit_before># About

This folder stores php code used to communicate
with Vivo in order to generate "business cards"
displayed by the wordpress.

Examples:

* http://www.ctsi.ufl.edu/about/management/clinical-research-unit-directors/
* http://www.ctsi.ufl.edu/about/management/uf-ctsi-leadership/
* http://www.ctsi.ufl.edu/about/management/core-lab-directors/
* http://www.ctsi.ufl.edu/about/management/clinical-research-unit-directors/

* http://test.ctsi.ufl.edu/about/management/clinical-research-unit-directors/

# Installation

Please read the instructions in [INSTALL.md](INSTALL.md)<commit_msg>updated readme with a synopsis of the process used in the wp calls to vivo<commit_after># About

This folder stores php code used to communicate
with Vivo in order to generate "business cards"
displayed by the wordpress.

Examples:

* http://www.ctsi.ufl.edu/about/management/clinical-research-unit-directors/
* http://www.ctsi.ufl.edu/about/management/uf-ctsi-leadership/
* http://www.ctsi.ufl.edu/about/management/core-lab-directors/
* http://www.ctsi.ufl.edu/about/management/clinical-research-unit-directors/

* http://test.ctsi.ufl.edu/about/management/clinical-research-unit-directors/

# Installation

Please read the instructions in [INSTALL.md](INSTALL.md)

Process:

Inside the wp page there are calls that look like the following:

[vivo]http://vivo.ufl.edu/individual/n23877[/vivo]<!-- <NAME> -->
[vivo]http://vivo.ufl.edu/individual/n106202[/vivo]<!-- <NAME> -->
[vivo]http://vivo.ufl.edu/individual/n29435[/vivo]<!-- Brantly, Mark -->

This in turn makes a call to functions.php which is stored in
/var/www/portal/wp-content/themes/UFandShands/functions.php

Within functions.php is the following function:

function getvivoperson($atts, $content = null) {
        ob_start();
        getVIVOPersonData($content);
        $result = ob_get_contents();
        ob_end_clean();
        return $result;
        }
add_shortcode('vivo','getvivoperson');

The call to getVivoPersonData passes the URI to
/var/www/portal/wp-content/themes/UFandShands/vivo/vivo.php

This is then passed to vivo_card.php that runs the sparql query
and parses the return data.
{'fraction_non_alphanumeric': 0.1324411628980157, 'fraction_numerical': 0.007383479464697739, 'mean_word_length': 4.113207547169812, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2903794', 'n_tokens_mistral': 769, 'n_tokens_neox': 716, 'n_words': 159}