Similarities between term vector and article vector

get_search_article_similarities(search_terms, d_words = dictionary_words,
  w_vectors = WordVectors, a_vectors = article_vectors,
  a_df = article_df, query_type)

Arguments

search_terms

character vector containing search terms (words must appear in dictionary)

d_words

character vector containing the corpus dictionary, the indexes of the words in the dictionary should match the row indices of the WordVectors matrix

w_vectors

matrix containing semantic vectors for each word (e.g., WordVectors from the sample data in this package)

a_vectors

matrix containing semantic vectors for each article (e.g., article_vectors from the sample data)

a_df

dataframe containing necessary abstract information (e.g., article_df from sample data)

query_type

integer, 1 = compound search, 2 = AND search, 3 = OR search

Value

a dataframe containing article information

Details

The returned dataframe includes the following:

  • formatted_column: html printable abstract information

  • title: abstract title

  • wrap_title: wrapped title with html breaks

  • year: abstract year

  • index: index refering to the row vector in the article_vectors matrix

  • Similarity: cosine similarity between search terms and current abstract

Examples

search <- c("president") article_dataframe <- get_search_article_similarities(search,query_type=1) knitr::kable(head(article_dataframe))
#> #> #> |formatted_column |title |wrap_title | year| index| Similarity| #> |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------|----:|-----:|----------:| #> |<h4>Proceedings Of The Annual Meeting Of The Canadian Psychological Association.</h4><p style='font-size:12px'>Nolast, Nofirst</p><p style='font-size:11px'>Canadian Journal Of Experimental Psychology, 2,96-103</p><p style='font-size:11px'>Presents the proceedings of the 1947 Meeting of the Canadian Psychological Association, which was held at the Chateau Laurier in Ottawa on April 10-12. </p> |Proceedings Of The Annual Meeting Of The Canadian Psychological Association. |Proceedings Of The Annual Meeting Of The Canadian <br> Psychological Association. | 1947| 18| 0.5803517| #> |<h4>Constitution Of The Canadian Psychological Association.</h4><p style='font-size:12px'>Nolast, Nofirst</p><p style='font-size:11px'>Canadian Journal Of Experimental Psychology, 3,157-159</p><p style='font-size:11px'>Presents the Constitution of the Canadian Psychological Association, which includes Articles I through IX and one By-Law. </p> |Constitution Of The Canadian Psychological Association. |Constitution Of The Canadian Psychological <br> Association. | 1947| 29| 0.5155870| #> |<h4>Proceedings Of The Annual Meeting Of The Psychological Association Of The Province Of Quebec.</h4><p style='font-size:12px'>Clarke, Douglas Burns</p><p style='font-size:11px'>Canadian Journal Of Experimental Psychology, 3,155-156</p><p style='font-size:11px'>Presents the proceedings of the Annual Meeting of the Psychological Association of the Province of Quebec--April 19, 1947. The morning session was"devoted to a series of papers presented by members of the Association. These papers were presented concurrently in three sections, each generally dedicated to one of three aspects of psychology: clinical, general, or vocational guidance. The first part of the afternoon session was given over to a forum, conducted simultaneously in French and English, on the subject "A Challenge to Psychologists." Questions were asked on problems concerning the home, the school, the job, the hospital, and the community. The final session of the afternoon was reserved for the annual business meeting of the Association. The meeting also considered the problem of paid advertising by psychologists. </p> |Proceedings Of The Annual Meeting Of The Psychological Association Of The Province Of Quebec. |Proceedings Of The Annual Meeting Of The <br> Psychological Association Of The Province Of <br> Quebec. | 1947| 28| 0.4938219| #> |<h4>Ontario Psychological Association.</h4><p style='font-size:12px'>Nolast, Nofirst</p><p style='font-size:11px'>Canadian Journal Of Experimental Psychology, 2,104-104</p><p style='font-size:11px'>For some years small groups of psychologists have been meeting in Toronto and at other centres in Ontario for the presentation of papers and the discussion of problems of mutual interest. At the annual meeting of the Canadian Psychological Association held in Kingston in 1946, Ontario members of the C.P.A. met together to discuss the desirability of forming a provincial association. A committee was formed to draft a constitution and arrange for an inaugural meeting. The Ontario Psychological Association was inaugurated at a meeting held in Toronto on February 15, 1947. Some fifty delegates representing Ottawa, Kingston, Brockville, London, and Toronto were present. More information is provided here, including a list of the officers of the O.P.A for the current (1947) year. </p> |Ontario Psychological Association. |Ontario Psychological Association. | 1947| 10| 0.4874532| #> |<h4>The Certification Of Psychologists In Canada.</h4><p style='font-size:12px'>Bois, J. S. A.</p><p style='font-size:11px'>Canadian Journal Of Experimental Psychology, 1,1-10</p><p style='font-size:11px'>In 1947 the committees on certification of the Canadian Psychological Association and of the Psychological Association of the Province of Quebec recommended that regional boards be established to evaluate professional training at 3 levels. The Certified Psychological Technician would have a minimum of a baccalaureate degree in psychology, plus the recommendation of his department or supervisor during 6 months of experience; the Certified Associate in Psychology would be required to have earned a master's degree in psychology and have had one year of acceptable experience; the Certified Psychologist would have the equivalent of the doctorate in psychology and 2 years of professional experience. The opinion of the writer is that the certification process should be independent of the Association, that there should be created "a Board of Professional Examiners, sponsored and recognized by our associations, but independent of them in its finances and its activities." </p> |The Certification Of Psychologists In Canada. |The Certification Of Psychologists In Canada. | 1948| 38| 0.4777191| #> |<h4>Professor Chester E. Kellogg.</h4><p style='font-size:12px'>Nolast, Nofirst</p><p style='font-size:11px'>Canadian Journal Of Experimental Psychology, 3,136-136</p><p style='font-size:11px'>Chester E. Kellogg, Professor and former Chairman of the Department of Psychology, McGill University, died at his home in St. Lambert, Quebec, on July 2nd, 1948. To the members of the Canadian Psychological Association, Dr. Kellogg is, perhaps, best known as Honorary President of the Canadian Psychological Association for the year 1946-47. His publications dealt with education, test construction-particularly with tests suitable for the examination of illiterates,-and statistical methodology. His contribution to Canadian psychology, in his personal contacts and stimulus to others, went far beyond the concrete evidence of the written word. </p> |Professor Chester E. Kellogg. |Professor Chester E. Kellogg. | 1948| 67| 0.4764754|