1

For example

The main idea is to use some features to judge each node whether it is a text node or not.

vs.

The main idea is using some features to judge each node whether it is a text node or not.

Is there difference among them? are they both grammatical?

  • 1
    The first one is more common. However, I think it will sound more natural if it is as the following: " The main idea of using some features is to judge each node whether it is a text node or not." – Ghaith Alrestom Aug 14 '15 at 6:29
4

Both are grammatical. The infinitive is somewhat more common, but the gerund avoids the awkward repetition of infinitives.

In either case, the end of the sentence needs to be rewritten:

... to judge whether each node is a text node or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.