Untitled
unknown
plain_text
3 years ago
3.4 kB
3
Indexable
************* Module task_Surkou_Pavel_bigram task_Surkou_Pavel_bigram.py:19:0: C0330: Wrong continued indentation (add 11 spaces). .map(lambda x: re.findall(r'(narodnaya \w+)', x.lower())) # get narodnaya bigrams ^ | (bad-continuation) task_Surkou_Pavel_bigram.py:20:0: C0330: Wrong continued indentation (add 11 spaces). .filter(lambda x: len(x) > 0) # filter empty ^ | (bad-continuation) task_Surkou_Pavel_bigram.py:21:0: C0330: Wrong continued indentation (add 11 spaces). .flatMap(lambda x: x) # transform into one list ^ | (bad-continuation) task_Surkou_Pavel_bigram.py:22:0: C0330: Wrong continued indentation (add 11 spaces). .map(lambda x: (x.replace(' ','_'), 1)) # ^ | (bad-continuation) task_Surkou_Pavel_bigram.py:22:33: C0326: Exactly one space required after comma .map(lambda x: (x.replace(' ','_'), 1)) # ^ (bad-whitespace) task_Surkou_Pavel_bigram.py:23:0: C0330: Wrong continued indentation (add 11 spaces). .countByKey() ^ | (bad-continuation) task_Surkou_Pavel_bigram.py:24:0: C0330: Wrong continued indentation. ) ^ || (bad-continuation) ************* Module task_Surkou_Pavel_collocation task_Surkou_Pavel_collocation.py:6:15: C0326: Exactly one space required after : def npmi(bigram:str, num_occ:int) -> int: ^ (bad-whitespace) task_Surkou_Pavel_collocation.py:6:28: C0326: Exactly one space required after : def npmi(bigram:str, num_occ:int) -> int: ^ (bad-whitespace) task_Surkou_Pavel_collocation.py:43:0: C0330: Wrong continued indentation (add 24 spaces). .map(lambda x: [i for i in x if i not in stop_words_bc.value]) ^ | (bad-continuation) task_Surkou_Pavel_collocation.py:44:0: C0330: Wrong continued indentation. ) ^ || (bad-continuation) task_Surkou_Pavel_collocation.py:55:0: C0330: Wrong continued indentation (add 13 spaces). .reduceByKey(lambda x,y: x + y) # count number of bigrams ^ | (bad-continuation) task_Surkou_Pavel_collocation.py:55:25: C0326: Exactly one space required after comma .reduceByKey(lambda x,y: x + y) # count number of bigrams ^ (bad-whitespace) task_Surkou_Pavel_collocation.py:56:0: C0330: Wrong continued indentation (add 13 spaces). .filter(lambda x: x[1] >= 500) ^ | (bad-continuation) task_Surkou_Pavel_collocation.py:57:0: C0330: Wrong continued indentation. ) ^ || (bad-continuation) task_Surkou_Pavel_collocation.py:1:0: R0801: Similar lines in 2 files ==task_Surkou_Pavel_bigram:3 ==task_Surkou_Pavel_collocation:18 spark = SparkSession.builder \ .master("yarn") \ .appName("spark-course-rdd") \ .config("spark.driver.memory", "512m") \ .config("spark.driver.cores", "1") \ .config("spark.executor.instances", "3") \ .config("spark.executor.cores", "1") \ .config("spark.executor.memory", "1g") \ .getOrCreate() sc = spark.sparkContext rdd = sc.textFile("/data/wiki/en_articles_part") (duplicate-code) ------------------------------------------------------------------ Your code has been rated at 5.79/10 (previous run: 5.79/10, +0.00)
Editor is loading...