Skip to main content

Posts

Showing posts from July, 2020

What is AI and where it can use ?

     Artificial intelligence (AI) is a rapidly growing field that has the potential to revolutionise a wide range of industries. At its core, AI is the simulation of human intelligence in machines that are programmed to think and learn like humans. One of the most common and well-known use cases for AI is in the field of image and speech recognition. AI algorithms can be trained to identify and classify images and speech with a high degree of accuracy, making them useful in applications such as facial recognition and voice-controlled assistants. Another important use case for AI is in the field of natural language processing (NLP). NLP algorithms can be used to analyse and understand human language, making them useful for tasks such as language translation, sentiment analysis, and text summarisation. AI is also being used to improve the efficiency and accuracy of decision making in a wide range of industries, including finance, healthcare, and transportation. In finance, AI algorithms

Create Anagram using Python code

An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. For example, the word anagram can be rearranged into nag a ram, or the word binary into brainy or the word adobe into abode. It requires two text(.txt) files. One file should be meaningful words and another one for input. Dictionary words list for reference: example2.txt Input file with words(anagram to be created): example1.txt example2.txt example1.txt Open one jupyter notebook in the same directory where the two files are stored. Run below parts in each notebook paragraphs. #Part1 def merged_dict(list_data): merged = {} for d in list_data: for k, v in d.items (): if k not in merged: merged [k] = [] merged [k].append (v) return merged #Part2 f = open(“example2.txt”, “r”) ref_list = [] merge_dict ={} for line in f.readlines(): word = line.strip().lower() sorted_word = “”.join(sorted(list(word))) ref_dict = {sorted_word:word} ref_list.ap