<jupyter_start><jupyter_text>Notebook for Fos-tagging of text content  Step 1: Pull docker image. For further instructions visit https://hub.docker.com/r/lukaspkl/fos-tag<jupyter_code>!sudo docker pull lukaspkl/fos-tag:latest<jupyter_output>'sudo' is not recognized as an internal or external command,
operable program or batch file.<jupyter_text>Step 2: Run the image<jupyter_code>!sudo docker run -d -p 1122:8080 --name my-fos-tag  lukaspkl/fos-tag<jupyter_output>'sudo' is not recognized as an internal or external command,
operable program or batch file.<jupyter_text>Step 3: Use the image<jupyter_code>import requests 
import json
from tqdm import tqdm
#Check if docker works 
res = requests.get("http://localhost:1122")
print(res.text)
test = ["""Retinitis pigmentosa (RP) is an inherited retinal dystrophy caused by the loss of photoreceptors and characterized by retinal pigment deposits visible on fundus examination. Prevalence of non syndromic RP is approximately 1/4,000. The most common form of RP is a rod-cone dystrophy, in which the first symptom is night blindness, followed by the progressive loss in the peripheral visual field in daylight, and eventually leading to blindness after several decades. Some extreme cases may have a rapid evolution over two decades or a slow progression that never leads to blindness. In some cases, the clinical presentation is a cone-rod dystrophy, in which the decrease in visual acuity predominates over the visual field loss. RP is usually non syndromic but there are also many syndromic forms, the most frequent being Usher syndrome. To date, 45 causative genes/loci have been identified in non syndromic RP (for the autosomal dominant, autosomal recessive, X-linked, and digenic forms). Clinical diagnosis is based on the presence of night blindness and peripheral visual field defects, lesions in the fundus, hypovolted electroretinogram traces, and progressive worsening of these signs. Molecular diagnosis can be made for some genes, but is not usually performed due to the tremendous genetic heterogeneity of the disease. Genetic counseling is always advised. Currently, there is no therapy that stops the evolution of the disease or restores the vision, so the visual prognosis is poor. The therapeutic approach is restricted to slowing down the degenerative process by sunlight protection and vitaminotherapy, treating the complications (cataract and macular edema), and helping patients to cope with the social and psychological impact of blindness. However, new therapeutic strategies are emerging from intensive research (gene therapy, neuroprotection, retinal prosthesis).""", 
       """Technological improvements in rechargeable solid-state batteries are being driven by an ever-increasing demand for portable electronic devices. Lithium-ion batteries are the systems of choice, offering high energy density, flexible and lightweight design, and longer lifespan than comparable battery technologies. We present a brief historical review of the development of lithium-based rechargeable batteries, highlight ongoing research strategies, and discuss the challenges that remain regarding the synthesis, characterization, electrochemical performance and safety of these systems""", 
       """In most countries, sanitary landfilling is nowadays the most common way to eliminate municipal solid wastes (MSW). In spite of many advantages, generation of heavily polluted leachates, presenting significant variations in both volumetric flow and chemical composition, constitutes a major drawback. Year after year, the recognition of landfill leachate impact on environment has forced authorities to fix more and more stringent requirements for pollution control. This paper is a review of landfill leachate treatments. After the state of art, a discussion put in light an opportunity and some results of the treatment process performances are given. Advantages and drawbacks of the various treatments are discussed under the items: (a) leachate transfer, (b) biodegradation, (c) chemical and physical methods and (d) membrane processes. Several tables permit to review and summarize each treatment efficiency depending on operating conditions. Finally, considering the hardening of the standards of rejection, conventional landfill leachate treatment plants appear under-dimensioned or do not allow to reach the specifications required by the legislator. So that, new technologies or conventional ones improvements have been developed and tried to be financially attractive. Today, the use of membrane technologies, more especially reverse osmosis (RO), either as a main step in a landfill leachate treatment chain or as single post-treatment step has shown to be an indispensable means of achieving purification. """, 
       """With the ready accessibility of bibliometric data and the availability of ready-to-use tools for generating bibliometric indicators for evaluation purposes, there is the danger of inappropri- ate use. Here we present standards of good practice for analyzing bibliometric data and presenting and interpreting the results. Comparisons drawn between research groups as to research perfor- mance are valid only if (1) the scientific impact of the research groups or their publications are looked at by using box plots, Lorenz curves, and Gini coefficients to represent distribution characteristics of data (in other words, going beyond the usual arithmetic mean value), (2) different reference stan- dards are used to assess the impact of research groups, and the appropriateness of the reference stan- dards undergoes critical examination, and (3) statistical analyses comparing citation counts take into consideration that citations are a function of many influencing factors besides scientific quality."""]<jupyter_output><empty_output><jupyter_text>NB! Allow ~4 mins for dependencies to fully load  Single text<jupyter_code>query = test[0]

data = {"query" : query}

res = requests.post("http://localhost:1122/fos-tag", data=data)

res.text<jupyter_output><empty_output><jupyter_text>Multiple texts<jupyter_code>results = []

for text in tqdm(test):
    data = {"query":text}
    res =requests.post("http://localhost:1122/fos-tag", data=data)
    results.append(res.text)
results[2]<jupyter_output><empty_output><jupyter_text>Docker Opeations<jupyter_code>#Logs
!sudo docker logs my-fos-tag
#Stop
!sudo docker stop my-fos-tag
#Remove
!sudo docker rm my-fos-tag<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.049375096435735226, 'fraction_numerical': 0.005554698349020213, 'mean_word_length': 5.587398373983739, 'pattern_counts': {'":': 1, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, '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}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '344031', 'license': 'CC0-1.0', 'n_tokens_mistral': 1625, 'n_tokens_neox': 1461, 'n_words': 839, 'path': 'Text-to-FOS-Similarity.ipynb', 'repo_name': 'arash-hajikhani/Bigprod_FOS', 'size': '6481'}