Skip to main content
. 2023 Mar 27;9(4):77. doi: 10.3390/jimaging9040077
Algorithm 3 Multilingual evidence for fake news detection: feature extraction.
  • Input: news information n, languages to use for comparison lL the maximum amount N of news from the web search to compare with.

  • Output: cross-lingual evidence feature set (si,ai) of similarity with the original news and source credibility rank for each news wi item from a multilingual web search.

  •  1:

    function Multiverse(n, L, N)

  •  2:

        cross_lingual_evidence := []

  •  3:

        for lL do

  •  4:

             headlinel=Translate(n[headline],lang=l)

  •  5:

             W=Search(headlinel,top=N)

  •  6:

             for wW do

  •  7:

                 source_rank=AlexaRank(w)

  •  8:

                 # For similarity score cosine- or NLI-based function can be chosen

  •  9:

                 similarity=cross_lingual_news_similarity(n,w, l)

  • 10:

                 cross_lingual_evidence.append(similarity,source_rank)

  • 11:

              end for

  • 12:

          end for

  • 13:

          return cross_lingual_evidence

  • 14:

    end function