• Interesting calculation: wordcount


    Wordcount is almost the most commonly used distributed system exercise program, and Hadoop often uses this as an example. Let’s see how to do wordcount with a set calculator. First fromSingle threadStart. For example, there are some novel documents in d:\files\novel directory. Now, you need to count which words in these novels are most commonly […]

  • The most common word of leetcode


    order This article mainly records the most common words of leetcode subject Given a paragraph and a disabled word list. Returns the word that appears the most and is not in the disabled list. The title ensures that at least one word is not in the forbidden list, and the answer is unique. Words in […]

  • Leecode brush questions 3 every day


    Leecode brush questions 3 every day Title Description inversion string Write a function whose function is to invert the input string. The input string is given in the form of a character array s. Do not allocate additional space to another array. You must modify the input array in place and use the additional space […]

  • Length of the last word of leetcode


    order This article mainly records the length of the last word of leetcode subject Given a string s containing only uppercase and lowercase letters and spaces’ ‘, return the length of its last word. If the string scrolls from left to right, the last word is the last word. If there is no last word, […]

  • Leetcode goat Latin


    order This article mainly records the goat Latin of leetcode subject Given a sentence s with words separated by spaces. Each word contains only uppercase or lowercase letters. We want to convert the sentence into “goat Latin” (a fictional language similar to Pig Latin). The rules of goat Latin are as follows: If the word […]

  • How location coding (PE) plays a role in transformers


    In human language, the order of words and their position in sentences are very important. If the words are reordered, the meaning of the whole sentence will change, and may even become meaningless. Unlike LSTM, transformers has a built-in mechanism for processing sequence sorting, which treats each word in the sequence as independent of each […]

  • Open source SSH gadget, putty


    Open source SSH gadget, putty   An open source free gadget with small software and few functions Website: https://putty.org/   SSH default port number is 22   Putty is copied by selecting it with the left mouse button Right click to paste   Double click the left mouse button and select copy a word. Double […]

  • In the middle of the year, I have prepared a small number of automated interview questions. Welcome to the self-test


    Programming grammar questions: What data types does Python have How to merge two dictionaries How does Python write JSON to a file? Will the code in finally be executed after return in the except statement? What are variable and immutable types? Is the parameter passed by value or reference during Python function call? Differences between […]

  • Five Python libraries that are rarely mentioned but can improve NLP work efficiency


    This article will share five great but not often mentioned Python libraries that can help you solve various natural language processing (NLP) tasks. Contractions Contracts it can extend common English abbreviations and slang. And it can quickly and efficiently deal with most edge cases, such as the lack of apostrophe. For example, in the past, […]

  • Two scoring models of ES


    Correlation score: refers to the correlation between a document and a query statement. The document list matching the query statement can be obtained through inverted index How to put the documents that best meet the query needs of users in the forefront?The essence of the problem is a sorting problem. The sorting is based on […]

  • Using the string of golang to solve leetcode to flip the words in the string


    subject Given a string, flip each word in the string one by one. Example 1: Input: “the sky is blue” Output: “blue is sky the” Example 2: Input: “Hello world!” Output: “world! Hello” Explanation: the input string can contain extra spaces before or after it, but the inverted characters cannot be included. Example 3: Input: […]

  • 557. reversing words in strings


    557. reverse the word III in the string to the array. Reverse the order before converting to character & cyclic exchange View original question Problem solving ideas Split a string into arrays by spaces Traverse each item of the array, convert it into an array with split, reverse the order, and merge it into a […]