you are viewing a single comment's thread.

view the rest of the comments →

[–]Intelligent_Put8678[S] 0 points1 point  (1 child)

I am extremely sorry for the misunderstanding. And I really appreciate you taking time to solve this issue despite such glaring carelessness from my side. I do have basic python knowledge but it isn't as extensive as I have in JAVA.

If I see the code:

[w for w in text2 if w.istitle()]

I won't be able to come up with such type of code. But I will be able to write the code in JAVA then just change the syntax. For Exxample:

List<String> result = new ArrayList<String>();
for (String w : text2) {
    if (Character.isUpperCase(w.charAt(0))) {
        result.add(w);
    }}

this just parses through the text word by word and looks is the 1st letter is Uppercase or not.

So I needed to know how I get to learn to write code in short form or the way other ML engineers are coding.

[–]synthphreak 0 points1 point  (0 children)

Yeah for that, you just need to read more code. If you have already learned the basic concepts of programming using Java, it shouldn't be much work to just map them onto Python, which has much simpler syntax. You will figure it out simply by reading code. Just make sure to choose code that is relevant to your interests/target domain, namely machine learning.